PHP Exception and Error--throwable

Source: Internet
Author: User
Tags throwable

Throwable

Official Document Address: http://php.net/manual/en/class.throwable.php

PHP Support version: 7

Throwable is a basic interface in PHP 7 that can be used as a throw declaration for any object, including Expection (exception) and error (Errors).

1 Throwable {2   /*Method*/3   Abstract  Public stringgetMessage (void)//Get the message content thrown
4 Abstract Publicint GetCode (void)//Get the error code thrown
5 Abstract Public stringgetFile (void)//Gets the file name that generated the exception
6 Abstract Publicint getLine (void)//Get related line number
7 Abstract Public Arraygettrace (void)//Get tracking information, return array form
8 Abstract Public stringgettraceasstring (void)//Get tracking information, return string form
9 Abstract Publicthrowable getprevious (void)//return to previous Throwable
Ten Abstract Public string__tostring (void)//Thrown object is returned as a string, such as the corresponding result can be printed with echo One}

PHP Exception and Error--throwable

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.