You are on page 1of 5

Downloads

Documentation
Get Involved
Help

Search

Getting Started
Introduction
A simple tutorial
Language Reference
Basic syntax
Types
Variables
Constants
Expressions
Operators
Control Structures
Functions
Classes and Objects
Namespaces
Errors
Exceptions
Generators
References Explained
Predefined Variables
Predefined Exceptions
Predefined Interfaces and Classes
Context options and parameters
Supported Protocols and Wrappers

Security
Introduction
General considerations
Installed as CGI binary
Installed as an Apache module
Session Security
Filesystem Security
Database Security
Error Reporting
Using Register Globals
User Submitted Data
Magic Quotes
Hiding PHP
Keeping Current
Features
HTTP authentication with PHP
Cookies
Sessions
Dealing with XForms
Handling file uploads
Using remote files
Connection handling
Persistent Database Connections
Safe Mode
Command line usage
Garbage Collection
DTrace Dynamic Tracing

Function Reference
Affecting PHP's Behaviour
Audio Formats Manipulation
Authentication Services
Command Line Specific Extensions
Compression and Archive Extensions
Credit Card Processing
Cryptography Extensions
Database Extensions
Date and Time Related Extensions
File System Related Extensions
Human Language and Character Encoding Support
Image Processing and Generation
Mail Related Extensions
Mathematical Extensions
Non-Text MIME Output
Process Control Extensions
Other Basic Extensions
Other Services
Search Engine Extensions
Server Specific Extensions
Session Extensions
Text Processing
Variable and Type Related Extensions
Web Services
Windows Only Extensions
XML Manipulation
GUI Extensions

Keyboard Shortcuts
?
This help
j
Next menu item
k
Previous menu item
gp
Previous man page
gn
Next man page
G
Scroll to bottom
gg
Scroll to top
gh
Goto homepage
gs
Goto search
(current page)
/
Focus search box

Error::__construct
ErrorException::getSeverity

Manual de PHP
Referencia del lenguaje
Excepciones predefinidas

Change language: Spanish

Edit Report a Bug

Error
(PHP 7)

Introduccin
Error es la clase base para todos los errores de PHP internos.

Sinopsis de la Clase
Error implements Throwable {
/* Propiedades */
protected string $message ;
protected int $code ;
protected string $file ;
protected int $line ;
/* Mtodos */
public __construct ([ string $message = "" [, int $code = 0 [, Throwable $previous = NULL ]]] )
final public string getMessage ( void )
final public Throwable getPrevious ( void )
final public mixed 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 )
}

Propiedades
message

El mensaje de error

code

El cdigo de error
file

El nombre del fichero donde ocurri el error

line

La lnea donde ocurri el error

Tabla de contenidos
Error::__construct Construir el objeto error
Error::getMessage Obtener el mensaje de error
Error::getPrevious Devuelve el objeto Throwable anterior
Error::getCode Obtener el cdigo de error
Error::getFile Obtener el fichero en el que ocurro el error
Error::getLine Obtener la lnea en la que ocurri el error
Error::getTrace Obtener la traza de la pila
Error::getTraceAsString Obtener la traza de la pila como un string
Error::__toString Representacin de string del error
Error::__clone Clonar el error

add a note

User Contributed Notes 2 notes

up
down
3
JustinasMalkas
1 year ago
If after PHP upgrade you're getting error "PHP Fatal error: Cannot declare class error, because the
name is already in use ...", you will have to rename your "error" class.
Since PHP 7 classname "Error" is predefined and used internally.
up
down
0
guresidhu05 at gmail dot com
8 days ago
i got an syntax error while installing php on my macbook
it says
Users takes an argument, effective user id for this server
add a note

Excepciones predefinidas
Exception
ErrorException
Error
ArithmeticError
AssertionError
DivisionByZeroError
ParseError
TypeError

Copyright 2001-2017 The PHP Group


My PHP.net
Contact
Other PHP.net sites
Mirror sites
Privacy policy

You might also like