Pre-defined Exceptions-PHP manual notes

Source: Internet
Author: User
Tags php class

Original: Pre-defined exception-PHP manual note

Exceptionis the base class for all exceptions, and the class summary is as follows:

<?php class Exception {protected string $message;  // 异常消息内容protected int $code;  // 异常代码protected string $file;  // 抛出异常的文件名protected int $line;  // 抛出异常在该文件的行号public __construct([string $message = "" [, int $code = 0 [, Exception $previous = NULL]]])final public string getMessage(void)final public Exception getPrevious(void)final public int getCode(void)final public string getFile(void)final public int getLine(void)final public array getTrace(void)final public string getTraceAsString(void)public string __toString(void)final private void __clone(void)}

ErrorExceptionis an error exception and the class summary is as follows:

<?php class ErrorException extends Exception {protected int $severity;  // 异常级别public __construct([string $message = "" [, int $code = 0 [, int $severity = 1 [, string $filename = __FILE__ [, int $lineno = __LINE__ [, Exception $previous = NULL]]]]]])final public int getSeverity(void)}

(End of full text)

Pre-defined Exceptions-PHP manual notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.