PHP Exception and Error--runtimeexception

Source: Internet
Author: User

RuntimeException

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

PHP Support version: 5 >=5.1, 7

Error exception. Inherit Exception, PHP 7 reference interface Throwable.

classRuntimeExceptionextends Exception ImplementsThrowable {//PHP 7 supports Throwable interface  /*Inheritance Properties*/  protected string $message;//Exception Information    protectedInt$code;//Error code    protected string $file;//Error File    protectedInt$line;//Error Line number       /*Method*/   Public__construct ([string $message= "" [, int$code= 0 [,Exception $previous=NULL]]] )//constructs an exception     Public__construct ([string $message= "" [, int$code= 0 [, Throwable$previous=NULL]]] )//PHP 7    /*Inheritance Method*/  Final  Public string Exception:: GetMessage (void)//gets the message content that was thrown  Final  PublicThrowableException:: GetPrevious (void)//back to previous Throwable  Final  Public Mixed Exception:: GetCode (void)//get the error code thrown  Final  Public string Exception:: GetFile (void)//gets the file name that generated the exception  Final  PublicIntException:: GetLine (void)//get the relevant line number  Final  Public Array Exception:: Gettrace (void)//get trace information, return array form  Final  Public string Exception:: gettraceasstring (void)//get trace information, return a string form   Public string Exception:: __tostring (void)//the thrown object is returned as a string, and the result can be printed with echo  Final PrivatevoidException:: __clone (void)//attempting to clone an exception will result in a fatal error}

PHP Exception and Error--runtimeexception

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.