Merge branch '201703_bubble_exceptions' of https://github.com/JonesAndrew/wren into JonesAndrew-201703_bubble_exceptions

This commit is contained in:
Bob Nystrom
2017-10-06 06:58:27 -07:00
3 changed files with 48 additions and 9 deletions
+31
View File
@@ -8,3 +8,34 @@ System.print(fiber.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try
var fiber2 = Fiber.new {
var fiberInner = Fiber.new {
System.print("before")
true.unknownMethod
System.print("after")
}
fiberInner.call()
}
System.print(fiber2.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try
var fiber3 = Fiber.new {
var fiberInner = Fiber.new {
var fiberInnerInner = Fiber.new {
System.print("before")
true.unknownMethod
System.print("after")
}
fiberInnerInner.call()
}
fiberInner.call()
}
System.print(fiber3.try())
// expect: before
// expect: Bool does not implement 'unknownMethod'.
System.print("after try") // expect: after try