| 235 | # this is the most convenient place to put the test right now. |
| 236 | |
| 237 | class ThrowingMessageHandler( IECore.MessageHandler ): |
| 238 | |
| 239 | def __init__( self ) : |
| 240 | |
| 241 | IECore.MessageHandler.__init__( self ) |
| 242 | |
| 243 | def handle( self, level, context, msg ): |
| 244 | |
| 245 | if context == "python" : |
| 246 | raise Exception( "Test" ) |
| 247 | else : |
| 248 | assert( context == "c++" ) |
| 249 | # This will raise a C++ exception that gets translated to a |
| 250 | # Python exception, and then gets translated back to a C++ |
| 251 | # exception by the MessageHandlerWrapper, before finally |
| 252 | # being converted back to another Python exception by the |
| 253 | # binding for `IECore.msg()`. |
| 254 | IECore.StringAlgo.substitute( "##", { "frame" : IECore.BoolData( False ) } ) |
| 255 | |
| 256 | for exceptionType in [ "python", "c++" ] : |
| 257 |
no outgoing calls
no test coverage detected