private void Throw(JSValue thrownValue) { if (CurrentException == null || !ReferenceEquals(CurrentException.ThrownValue, thrownValue)) { CurrentException = new ExceptionObject(thrownValue, CurrentException); } Unwind(); }
internal bool TryHandle(ExceptionObject exception) { Contract.Requires(exception != null); if (_currentTryBlock == null) { return(false); } LocalScope = _currentTryBlock.Scope; CodeReader.Seek(_currentTryBlock.HandlerOffset); _currentTryBlock = _currentTryBlock.OuterBlock; _evalStack.Push(exception.ThrownValue); _evalStack.Push((JSNumberValue)1); return(true); }
public ExceptionObject(JSValue thrownValue, ExceptionObject inner) { Contract.Requires(thrownValue != null); ThrownValue = thrownValue; Inner = inner; }