History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: BOO-910
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Marcus Griep
Reporter: Marcus Griep
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Boo

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

Created: 26/Oct/07 02:31 PM   Updated: 26/Oct/07 09:19 PM
Component/s: Compiler
Affects Version/s: 0.8
Fix Version/s: 0.8.1

Time Tracking:
Not Specified

Issue Links:
Related
 


 Description  « Hide
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).



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Marcus Griep - 26/Oct/07 02:32 PM
Included in linked issue's patch.

Marcus Griep - 26/Oct/07 09:19 PM
Revision 2744