Package org.mozilla.javascript

Examples of org.mozilla.javascript.WrappedException


            case 'M':  calUnit = Calendar.MONTH;        break;
            case 'q':  calUnit = Calendar.MONTH; dur *= 3;    break;
            case 'y':  calUnit = Calendar.YEAR;          break;
            case 'D':  calUnit = Calendar.YEAR; dur *= 10;    break; // decade
            case 'C':  calUnit = Calendar.YEAR;  dur *= 100;    break; // century :-D go long!
            default : throw new WrappedException(new ScriptusRuntimeException("unrecognised unit: "+unit));
          }
         
          until.add(calUnit, dur);
        }
      }
    }
   
    if( ! foundDate) {
      throw new WrappedException(new ScriptusRuntimeException("Could not recognise duration argument: "+o+" must either be integer >1, or match date format "+ScriptusConfig.DATE_FORMAT+" or duration format regexp "+ScriptusConfig.DURATION_FORMAT));
    }

    return until;
   
  }
View Full Code Here


      }
     
    }
   
    if(msg == null){
      throw new WrappedException(new ScriptusRuntimeException("invalid args to ask function, format: ask(question, [{who:who, timeout:duration}]"));
    }

    ContinuationPending pending = Context.getCurrentContext().captureContinuation();
    pending.setApplicationState(new Ask(msg, who, timeout, rnd.nextLong()));
    throw pending;
View Full Code Here

      }
     
    }
   
    if(msg == null){
      throw new WrappedException(new ScriptusRuntimeException("no message argument to say function"));
    }
   
    ContinuationPending pending = Context.getCurrentContext().captureContinuation();
    pending.setApplicationState(new Say(msg, who));
    throw pending;
View Full Code Here

      return trace.toString();
    }

  public static RhinoException ensureRhino(Exception e) {
    if (e instanceof RhinoException) return (RhinoException)e;
    else return new WrappedException(e);
  }
View Full Code Here

TOP

Related Classes of org.mozilla.javascript.WrappedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.