Skip to content
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Our current exceptions in SIMPLE are quite simplistic: the thrown
exceptional value is caught by the innermost try-catch statement, and
you get a runtime error (stuck) if the type of the thrown value is not
the same as the type of the exception's parameter.  They work fine if
you restrict them to only throw and catch integer values, like we did
in the static semantics, but modern languages do not like this
limitation.  Change the existing dynamic semantics of typed SIMPLE to
propagate a thrown exception to the outer try-catch statement when the
inner one cannot handle the exception due to a type mismatch.  For
"try { try { throw 7; } catch(bool x) {print(1};} } catch{int x) {print(2);}"
should print 2, and not get stuck as it currently happens.
You can’t perform that action at this time.