public class Scope
extends java.lang.Object
Constructor and Description |
---|
Scope() |
Modifier and Type | Method and Description |
---|---|
static void |
assertNoError() |
static void |
defer(ScopedException exception) |
static void |
enter(Location location) |
static void |
enter(ScopeProvider scopeProvider) |
static void |
exit() |
static void |
registerError(java.lang.String msg,
ScopeProvider... scopeProviders)
Convenience method to add an error in a known list of scopes, w/o adding try catch flows.
|
public static void enter(Location location)
public static void enter(ScopeProvider scopeProvider)
public static void exit()
public static void defer(ScopedException exception)
public static void registerError(java.lang.String msg, ScopeProvider... scopeProviders)
This code actually starts entering the given scopes 1 by 1, starting from 0. When list is consumed, it creates the exception and defers if possible then exits from the provided scopes.
Note that these scopes are added on top of the already existing scopes.
msg
- The exception messagescopeProviders
- The list of additional scope providers to enter. Null scopes are
automatically ignored.public static void assertNoError()