Esempio n. 1
0
        //---------------------------------------------------------------------------------------
        // HandleError
        //
        //  Handle an error. There are two actions that can be taken when an error occurs:
        //    - throwing an exception with no recovering action (eval case)
        //    - notify the host that an error occurred and let the host decide whether or not
        //      parsing has to continue (the host returns true when parsing has to continue)
        //---------------------------------------------------------------------------------------

        internal void HandleError(JScriptException error)
        {
            if (m_parser != null)
            {
                if (!m_parser.OnCompilerError(error))
                {
                    throw new EndOfFileException(); // this exception terminates the parser
                }
            }
        }