# Here, I have temporarily disabled the compiler checks ensuring
# that raised objects derive from System.Exception in order to test
# that the exception is wrapped at runtime (For testing purposes only!).
# Under normal conditions, Boo prevents you from doing this (and will continue to do so)
# This can be simulated by throwing from a C++ assembly (the C++/CLI compiler does not
# enforce CLS-compliant exceptions
class Test:
override def ToString():
return "Tres"
try:
raise Test()
except ex:
print "Caught!"
print ex