Files
deb-murano/murano/tests/dsl/meta/ExceptionHandling.yaml
Stan Lagun 705a0f5838 Fixed incorrect information on Python frames in MuranoPL stack traces
Python frames in mixed stack traces were missing file name and pointed to a line
below correct position

Change-Id: I335292f40b3b6ea3dbca80b84f1d8dbed9a6581d
Fixes: bug #1331113
2014-07-12 17:18:33 +00:00

56 lines
1.1 KiB
YAML

Name: ExceptionHandling
Methods:
testThrow:
Arguments:
- enum:
Contract: $.int().notNull()
Body:
Try:
- trace('enter try')
- $.doThrow($enum)
- trace('exit try')
Catch:
- With: exceptionName
As: e
Do:
- trace($e.message)
- With: anotherExceptionName
As: e
Do:
- trace($e.message)
- trace(rethrow)
- Rethrow:
- As: e
Do:
- trace('catch all')
- trace($e.message)
Else:
- trace('else section')
Finally:
- trace('finally section')
doThrow:
Arguments:
- enum:
Contract: $.int().notNull()
Body:
- Match:
1:
- Throw: exceptionName
Message: exception message
2:
- Throw: anotherExceptionName
Message: exception message 2
3:
- Throw: thirdExceptionName
Message: exception message 3
4:
- Return:
Value: $enum
testStackTrace:
Body:
raisePythonException()