@@ -26,12 +26,13 @@ of arguments required.
26
26
In opcode signatures below, we use the following types, which may not
27
27
correspond directly to NQP types.
28
28
29
- * int - native int
30
- * num - native float
31
- * str - native string
32
- * Any - an NQP or VM object
33
- * Type - a type object, e.g. ` Int `
34
- * Handle - an I/O Handle object
29
+ * int - native int
30
+ * num - native float
31
+ * str - native string
32
+ * Any - an NQP or VM object
33
+ * Type - a type object, e.g. ` Int `
34
+ * Exception - an Exception object
35
+ * Handle - an I/O Handle object
35
36
36
37
# Arithmetic Opcodes
37
38
@@ -407,6 +408,76 @@ Return a string containing `$count` copies of the string.
407
408
408
409
# Exceptional Opcodes
409
410
411
+ ##backtrace
412
+ * ` backtrace(Exception $ex) `
413
+
414
+ Return an array of hashes, describing the backtrace of the given exception.
415
+
416
+ ##backtracestrings
417
+ * ` backtracestrings(Exception $ex) `
418
+
419
+ Return an array of strings, describing the backtrace of the given exception.
420
+
421
+ ##die
422
+ * ` die(str $message) `
423
+
424
+ Create and throw an exception using the given message.
425
+
426
+ ##getextype
427
+ * ` getextype(Exception $ex) `
428
+
429
+ Gets the exception category (` nqp::const::CONTROL_* ` )
430
+
431
+ ##getmessage
432
+ * ` getmessage(Exception $ex) `
433
+
434
+ Gets the exception message.
435
+
436
+ ##getpayload
437
+ * ` getpayload(Exception $ex) `
438
+
439
+ Gets the exception payload.
440
+
441
+ ##exception
442
+ * ` exception() `
443
+
444
+ Return the current exception object.
445
+
446
+ ##newexception
447
+ * ` newexception() `
448
+
449
+ Return a new exception object.
450
+
451
+ ##resume
452
+ * ` resume(Exception $ex) `
453
+
454
+ Resume the exception, if possible.
455
+
456
+ ##rethrow
457
+ * ` rethrow(Exception $ex) `
458
+
459
+ Re-throw the exception.
460
+
461
+ ##setextype
462
+ * ` setextype(Exception $ex, int $type) `
463
+
464
+ Sets the exception category (` nqp::const::CONTROL_* ` )
465
+
466
+ ##setmessage
467
+ * ` setmessage(Exception $ex, str $message) `
468
+
469
+ Sets the exception message.
470
+
471
+ ##setpayload
472
+ * ` setpayload(Exception $ex, Any $obj) `
473
+
474
+ Sets the exception payload.
475
+
476
+ ##throw
477
+ * ` throw(Exception $ex) `
478
+
479
+ Throw the exception.
480
+
410
481
# Input/Output Opcodes
411
482
412
483
##closefh
0 commit comments