Class: I2CE Error (Development)

From IHRIS Wiki


The class I2CE_Error contains 2 definitions:

i2ce/lib/classDefs/I2CE_Error_5_2.php

This article describes the class I2CE_Error .

This class mainly handles throwing errors from withing I2CE

Variables

$stored_messages

An array of the notice/warning messages received for this session array $stored_messages

$errorType

$noticeErrors

$warningErrors

$ignoreErrorsFromFilesMatching

$ignoreErrors

$site_warnings

Count of the number of erros and warings received when the site is not initialized @param static protected boolean $site_warnings

$error_num

$errorHandler

Optional error handler callback.

$started_errors

$errorImage

$errorStart

$badness

$trace_depth

integer $trace_depth. Defaults to 1. The number of previous methods to report when an error message is developed. Set to a negative number to report all, or 0 to report none.

Methods

getPrevMethod()

Parse the debug backtrace to get the method that raised the error.

handleError()

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_2.php on line 640
  • Signature: public function handleError($err_no,$err_string,$err_file,$err_line,$err_context)
  • Parameters:
    • $err_no
    • $err_string
    • $err_file
      • Default Value: false
    • $err_line
      • Default Value: false
    • $err_context
      • Default Value: false

hasWarnings()

See if there were any warning messages set before the site was initialized

popErrorHandler()

Pop an error handler off of the stack.

pushErrorHandler()

Push an error handler onto the stack. @param $callback

raiseError()

Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_2.php on line 671
  • Signature: static public function raiseError($message,$type,$redirect)
  • Parameters:
    • $message
      • Default Value: null
    • integer $type
      The error type.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to for critical errors. @global array
      • Default Value: ""

raiseMessage()

Raise an error message, but don't display any extra trace messages to keep the log file short when the trace isn't necessary. @param string/mixed $message The error message.

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_2.php on line 632
  • Signature: static public function raiseMessage($message,$type,$redirect)
  • Parameters:
    • $message
      • Default Value: null
    • integer $type
      The error type.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to for critical errors.
      • Default Value: ""

resetStoredMessages()

setTraceDepth()

Set the trace depth used in reporting error messages

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_2.php on line 833
  • Signature: static public function setTraceDepth($depth)
  • Parameters:
    • integer $depth Set to a negative number to report all, 0 to report none.
  • Returns: integer.
    The previous value of trace depth.

i2ce/lib/classDefs/I2CE_Error_5_3.php

This article describes the class I2CE_Error .

This class mainly handles throwing errors from withing I2CE

Variables

$stored_messages

An array of the notice/warning messages received for this session array $stored_messages

$errorType

$noticeErrors

$warningErrors

$ignoreErrorsFromFilesMatching

$ignoreErrors

$site_warnings

Count of the number of erros and warings received when the site is not initialized @param static protected boolean $site_warnings

$error_num

$errorHandler

Optional error handler callback.

$started_errors

$errorImage

$errorStart

$badness

$trace_depth

integer $trace_depth. Defaults to 1. The number of previous methods to report when an error message is developed. Set to a negative number to report all, or 0 to report none.

Methods

getPrevMethod()

Parse the debug backtrace to get the method that raised the error.

handleError()

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_3.php on line 640
  • Signature: public function handleError($err_no,$err_string,$err_file,$err_line,$err_context)
  • Parameters:
    • $err_no
    • $err_string
    • $err_file
      • Default Value: false
    • $err_line
      • Default Value: false
    • $err_context
      • Default Value: false

hasWarnings()

See if there were any warning messages set before the site was initialized

popErrorHandler()

Pop an error handler off of the stack.

pushErrorHandler()

Push an error handler onto the stack. @param $callback

raiseError()

Raise an error and redirect the user for any critical errors. The default redirect will go to the home page for the site. @param string/mixed $message The error message.

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_3.php on line 671
  • Signature: static public function raiseError($message,$type,$redirect)
  • Parameters:
    • $message
      • Default Value: null
    • integer $type
      The error type.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to for critical errors. @global array
      • Default Value: ""

raiseMessage()

Raise an error message, but don't display any extra trace messages to keep the log file short when the trace isn't necessary. @param string/mixed $message The error message.

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_3.php on line 633
  • Signature: static public function raiseMessage($message,$type,$redirect)
  • Parameters:
    • $message
      • Default Value: null
    • integer $type
      The error type.
      • Default Value: E_USER_NOTICE
    • string $redirect
      The page to redirect to for critical errors.
      • Default Value: ""

resetStoredMessages()

setTraceDepth()

Set the trace depth used in reporting error messages

  • Defined in i2ce/lib/classDefs/I2CE_Error_5_3.php on line 834
  • Signature: static public function setTraceDepth($depth)
  • Parameters:
    • integer $depth Set to a negative number to report all, 0 to report none.
  • Returns: integer.
    The previous value of trace depth.