Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java] forgot the all important LeaveStackUndwinderException
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
java/runtime/Rakudo/Runtime/Exceptions/LeaveStackUnwinderException.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package Rakudo.Runtime.Exceptions; | ||
|
||
import Rakudo.Metamodel.RakudoObject; | ||
import Rakudo.Metamodel.Representations.RakudoCodeRef; | ||
|
||
/// <summary> | ||
/// This exception is thrown to actually unwind the (dotnet) stack after | ||
/// we run an exception handler. | ||
/// </summary> | ||
public class LeaveStackUnwinderException extends Exception | ||
{ | ||
/// <summary> | ||
/// The block we're looking for. | ||
/// </summary> | ||
public RakudoCodeRef.Instance TargetBlock; | ||
|
||
/// <summary> | ||
/// The value to exit with. | ||
/// </summary> | ||
public RakudoObject PayLoad; | ||
|
||
/// <summary> | ||
/// Creates a LeaveStackUnwinderException to target the given block | ||
/// and exit it with the specified payload. | ||
/// </summary> | ||
/// <param name="TargetBlock"></param> | ||
/// <param name="PayLoad"></param> | ||
public LeaveStackUnwinderException(RakudoCodeRef.Instance targetBlock, RakudoObject payLoad) | ||
{ | ||
this.TargetBlock = targetBlock; | ||
this.PayLoad = payLoad; | ||
} | ||
} | ||
|