Boo

Boo doesn't catch non-CLS compliant exceptions at runtime

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 0.8
  • Fix Version/s: 0.8.1
  • Component/s: Compiler
  • Labels:
    None
  • Number of attachments :
    0

Description

Take this example:

# 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

In this example the exception will not be caught. The remedy is to emit the RuntimeCompatibilityAttribute(WrapNonExceptionThrows=true).

Issue Links

Activity

Hide
Marcus Griep added a comment -

Included in linked issue's patch.

Show
Marcus Griep added a comment - Included in linked issue's patch.
Hide
Marcus Griep added a comment -

Revision 2744

Show
Marcus Griep added a comment - Revision 2744

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: