|
Thanks for the thread reference - I had missed it before.
I agree with the difficulties of throwing an arbitrary type (Java class has to implement Throwable, etc), and that's perfectly reasonable. Having a separate exception type in slice is fine, I think it actually makes a spec more readable.
However I do think that the exception type should have all the abilities of a struct. It should be passable as a parameter, and be able to be a member of a class or struct. This shouldn't present a mapping problem since exceptions are normal objects in C#, Java, C++, and Python.
|