Esempio n. 1
0
 private void Throw(JSValue thrownValue)
 {
     if (CurrentException == null || !ReferenceEquals(CurrentException.ThrownValue, thrownValue))
     {
         CurrentException = new ExceptionObject(thrownValue, CurrentException);
     }
     Unwind();
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
 public ExceptionObject(JSValue thrownValue, ExceptionObject inner)
 {
     Contract.Requires(thrownValue != null);
     ThrownValue = thrownValue;
     Inner       = inner;
 }