Exemple #1
0
 private void Clear()
 {
     _error     = null;
     _err_line  = 0;
     _procedure = null;
     _result    = null;
 }
Exemple #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);
 }
Exemple #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;
 }
Exemple #4
0
 public ScriptResult(Script script, ProcedureItem procedure)
 {
     Script    = script;
     Procedure = procedure;
 }
 public ScriptSuccees(Script script, ProcedureItem procedure = null)
     : base(script, procedure)
 {
 }