Skip to content

Commit

Permalink
Improve string representation of BoxExceptions.
Browse files Browse the repository at this point in the history
Show the exception type as well as subtype in GetMessage().
  • Loading branch information
qris committed Nov 14, 2016
1 parent 80735e8 commit bfdcbd3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/common/makeexception.pl.in
Expand Up @@ -160,12 +160,13 @@ for(my $e = 0; $e <= $#exception; $e++)
{
if($exception[$e] ne '')
{
print CPP "\t\tcase ".$exception[$e].': return "'.$exception[$e].'";'."\n";
print CPP "\t\tcase ".$exception[$e].': return "'.$class.'Exception'.
'('.$exception[$e].')";'."\n";
}
}

print CPP <<__E;
default: return "Unknown";
default: return "${class}Exception(Unknown)";
}
}
__E
Expand Down

0 comments on commit bfdcbd3

Please sign in to comment.