Skip to content

Commit

Permalink
[java] forgot the all important LeaveStackUndwinderException
Browse files Browse the repository at this point in the history
  • Loading branch information
mberends committed Oct 22, 2010
1 parent 23c1a95 commit c556af5
Showing 1 changed file with 34 additions and 0 deletions.
@@ -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;
}
}

0 comments on commit c556af5

Please sign in to comment.