Skip to content

Commit 45198dc

Browse files
committed
[reflection] Fine-tune error messages
1 parent edc7109 commit 45198dc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

stdlib/public/RemoteInspection/TypeLowering.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ std::string TypeConverter::takeLastError() {
15591559
if (!LastError.first)
15601560
return {};
15611561
std::stringstream s;
1562-
s << ": " << LastError.first;
1562+
s << LastError.first << ": ";
15631563
if (LastError.second)
15641564
LastError.second->dump(s);
15651565

@@ -2680,8 +2680,11 @@ TypeConverter::getTypeInfo(const TypeRef *TR,
26802680
// Compute the result and cache it
26812681
auto *TI = LowerType(*this, ExternalTypeInfo).visit(TR);
26822682
Cache.insert({{TR, ExternalTypeInfoId}, TI});
2683-
if (!TI && ErrorCache)
2683+
if (!TI && ErrorCache) {
2684+
if (!LastError.first)
2685+
LastError = {"cannot decode or find", TR};
26842686
ErrorCache->insert({{TR, ExternalTypeInfoId}, LastError});
2687+
}
26852688

26862689
RecursionCheck.erase(TR);
26872690

0 commit comments

Comments
 (0)