예제 #1
0
 private void Clear()
 {
     _error     = null;
     _err_line  = 0;
     _procedure = null;
     _result    = null;
 }
예제 #2
0
 public bool Run(ProcedureItem procedure, bool noevent = false)
 {
     Clear();
     if (procedure == null)
     {
         return(true);
     }
     _procedure = procedure;
     try {
         _result = procedure.Module.Run(procedure.Name, procedure.Params);
         return(true);
     } catch (Exception ex) {
         var quitEx = Regex.Match(ex.Message, @"^Quit=(\d+)$", RegexOptions.IgnoreCase);
         if (quitEx.Success)
         {
             return(quitEx.Groups[1].Value == "0" ? true : false);
         }
         if (_error == null)
         {
             throw;
         }
         if (OnError != null && !noevent)
         {
             OnError(_error);
         }
     }
     return(false);
 }
예제 #3
0
 public ScriptError(Script script, ProcedureItem procedure, string err_message)
     : base(script, procedure)
 {
     StackTrace  = new List <TraceLine>();
     Message     = err_message.CleanEnd();
     Information = string.Empty;
 }
예제 #4
0
 public ScriptResult(Script script, ProcedureItem procedure)
 {
     Script    = script;
     Procedure = procedure;
 }
예제 #5
0
 public ScriptSuccees(Script script, ProcedureItem procedure = null)
     : base(script, procedure)
 {
 }