ExceptionsTable of Contents
 SPL provides a set of standard Exceptions. See also the Predefined Exceptions SPL Exceptions Class Tree
 The BadFunctionCallException classIntroductionException thrown if a callback refers to an undefined function or if some arguments are missing. Class synopsisBadFunctionCallException 
 
    
     
       class BadFunctionCallException
     
 
    
      extends
       LogicException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The BadMethodCallException classIntroductionException thrown if a callback refers to an undefined method or if some arguments are missing. Class synopsisBadMethodCallException 
 
    
     
       class BadMethodCallException
     
 
    
      extends
       BadFunctionCallException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The DomainException classIntroductionException thrown if a value does not adhere to a defined valid data domain. Class synopsisDomainException 
 
    
     
       class DomainException
     
 
    
      extends
       LogicException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The InvalidArgumentException classIntroductionException thrown if an argument is not of the expected type. Class synopsisInvalidArgumentException 
 
    
     
       class InvalidArgumentException
     
 
    
      extends
       LogicException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The LengthException classIntroductionException thrown if a length is invalid. Class synopsisLengthException 
 
    
     
       class LengthException
     
 
    
      extends
       LogicException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The LogicException classIntroductionException that represents error in the program logic. This kind of exceptions should directly lead to a fix in your code. Class synopsisLogicException 
 
    
     
       class LogicException
     
 
    
      extends
       Exception
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The OutOfBoundsException classIntroductionException thrown if a value is not a valid key. This represents errors that cannot be detected at compile time. Class synopsisOutOfBoundsException 
 
    
     
       class OutOfBoundsException
     
 
    
      extends
       RuntimeException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The OutOfRangeException classIntroductionException thrown when an illegal index was requested. This represents errors that should be detected at compile time. Class synopsisOutOfRangeException 
 
    
     
       class OutOfRangeException
     
 
    
      extends
       LogicException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The OverflowException classIntroductionException thrown when adding an element to a full container. Class synopsisOverflowException 
 
    
     
       class OverflowException
     
 
    
      extends
       RuntimeException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The RangeException classIntroductionException thrown to indicate range errors during program execution. Normally this means there was an arithmetic error other than under/overflow. This is the runtime version of DomainException. Class synopsisRangeException 
 
    
     
       class RangeException
     
 
    
      extends
       RuntimeException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The RuntimeException classIntroductionException thrown if an error which can only be found on runtime occurs. Class synopsisRuntimeException 
 
    
     
       class RuntimeException
     
 
    
      extends
       Exception
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The UnderflowException classIntroductionException thrown when performing an invalid operation on an empty container, such as removing an element. Class synopsisUnderflowException 
 
    
     
       class UnderflowException
     
 
    
      extends
       RuntimeException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   }The UnexpectedValueException classIntroductionException thrown if a value does not match with a set of values. Typically this happens when a function calls another function and expects the return value to be of a certain type or value not including arithmetic or buffer related errors. Class synopsisUnexpectedValueException 
 
    
     
       class UnexpectedValueException
     
 
    
      extends
       RuntimeException
     
     { 
 
    /* Inherited properties */ 
    
     protected
     string
     $message
    ; 
     protected
     int
     $code
    ; 
     protected
     string
     $file
    ; 
     protected
     int
     $line
    ; 
   /* Inherited methods */ 
    
   final public string Exception::getMessage
    ( void
   ) 
   final public Exception Exception::getPrevious
    ( void
   ) 
   final public mixed Exception::getCode
    ( void
   ) 
   final public string Exception::getFile
    ( void
   ) 
   final public int Exception::getLine
    ( void
   ) 
   final public array Exception::getTrace
    ( void
   ) 
   final public string Exception::getTraceAsString
    ( void
   ) 
   public string  Exception::__toString
    ( void
   ) 
   final private void Exception::__clone
    ( void
   ) 
   } |