예제 #1
0
        private void OnError_Event()
        {
            var err = _msc_compiler.Error;

            try {
                if (ExitException.Is(err))
                {
                    if (ExitException.ExitCode(err) == 0 || _error != null)
                    {
                        return;
                    }
                }
                if (_error == null)
                {
                    _error = new ScriptError(_script, _procedure, err.Description);
                }
                var line = err.Line;
                if (_script != null && line != 0 && line != _err_line)
                {
                    _error.AddTrace(_script.GetTraceLineAt(line));
                }
                _err_line = line;
            } finally {
                err.Clear();
            }
        }
예제 #2
0
        private void OnError_Event()
        {
            if (_error == null)
            {
                _error = new ScriptError(_script, _procedure, _compiler.Error.Description);
            }
            var line = _compiler.Error.Line;

            if (_script != null && line != 0 && line != _err_line)
            {
                _error.StackTrace.Add(_script.GetTraceLineAt(line));
            }
            _err_line = line;
        }