downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Exception::__construct> <Excepciones predefinidas
Last updated: Fri, 20 May 2011

view this page in

Exception

Introducción

Exception es la clase base para todas las excepciones.

Clases sinopsis

Exception {
/* Propiedades */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Métodos */
public __construct ([ string $message = "" [, int $code = 0 [, Exception $previous = NULL ]]] )
final public string getMessage ( void )
final public Exception getPrevious ( void )
final public mixed getCode ( void )
final public string getFile ( void )
final public int getLine ( void )
final público array getTrace ( void )
final public string getTraceAsString ( void )
public string __toString ( void )
final private void __clone ( void )
}

Propiedades

message

El mensaje de excepción

code

El código de excepción

file

El nombre del archivo donde se lanzó la excepción

line

La línea fue lanzada en la excepción

Table of Contents



add a note add a note User Contributed Notes Exception
kayo 11-Dec-2009 09:20
To generate an exception use:

<?php
Throw new Exception("Message to display");
?>

By default it will be shown to the user. Use Try...catch to handle it.
taras dot dot dot di at gmail dot com 22-Jul-2008 11:08
Note that the default message is an empty string, and the default code is zero

 
show source | credits | stats | sitemap | contact | advertising | mirror sites