error(message, level)
Terminates the last protected function called and returns the message. The level argument specifies where the error function gets its information about the error position. If the function containing the error is not called in a protected function, then the script which called the function will terminate. The error function itself never returns and acts like a script error. If level is 1 (default), the error position is where the error function was called. Level 2 points the error to where the function that called error was called; and so on. Passing level 0 avoids the addition of error position information to the message.