com.caucho.quercus.lib
Class ErrorModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.ErrorModule
All Implemented Interfaces:
QuercusModule

public class ErrorModule
extends AbstractQuercusModule

PHP error handling.


Field Summary
static StringValue ARGS
           
static StringValue CLASS
           
static int E_ALL
           
static int E_COMPILE_ERROR
           
static int E_COMPILE_WARNING
           
static int E_CORE_ERROR
           
static int E_CORE_WARNING
           
static int E_ERROR
           
static int E_NOTICE
           
static int E_PARSE
           
static int E_RECOVERABLE_ERROR
           
static int E_STRICT
           
static int E_USER_ERROR
           
static int E_USER_NOTICE
           
static int E_USER_WARNING
           
static int E_WARNING
           
static StringValue FILE
           
static StringValue FUNCTION
           
static StringValue LINE
           
static StringValue TYPE
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
ErrorModule()
           
 
Method Summary
static Value debug_backtrace(Env env)
          Produces a backtrace
static Value die(Env env, java.lang.String msg)
          Exits
static boolean error_log(Env env, StringValue message, int type, StringValue destination, StringValue extraHeaders)
          Send a message to the log.
static long error_reporting(Env env, Value levelV)
          Changes the error reporting value.
 Value exit(Env env, Value msg)
          Exits
 IniDefinitions getIniDefinitions()
          Returns the default php.ini values.
static boolean restore_error_handler(Env env)
          Restores the error handler
static Value restore_exception_handler(Env env)
          Restore an exception handler
static boolean set_error_handler(Env env, Callable fun, int errorMask)
          Sets an error handler
static Value set_exception_handler(Env env, Callable fun)
          Sets an exception handler
static Value trigger_error(Env env, java.lang.String msg, int code)
          Triggers an error.
 Value user_error(Env env, java.lang.String msg, int code)
          Triggers an error.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

E_ERROR

public static final int E_ERROR
See Also:
Constant Field Values

E_WARNING

public static final int E_WARNING
See Also:
Constant Field Values

E_PARSE

public static final int E_PARSE
See Also:
Constant Field Values

E_NOTICE

public static final int E_NOTICE
See Also:
Constant Field Values

E_CORE_ERROR

public static final int E_CORE_ERROR
See Also:
Constant Field Values

E_CORE_WARNING

public static final int E_CORE_WARNING
See Also:
Constant Field Values

E_COMPILE_ERROR

public static final int E_COMPILE_ERROR
See Also:
Constant Field Values

E_COMPILE_WARNING

public static final int E_COMPILE_WARNING
See Also:
Constant Field Values

E_USER_ERROR

public static final int E_USER_ERROR
See Also:
Constant Field Values

E_USER_WARNING

public static final int E_USER_WARNING
See Also:
Constant Field Values

E_USER_NOTICE

public static final int E_USER_NOTICE
See Also:
Constant Field Values

E_ALL

public static final int E_ALL
See Also:
Constant Field Values

E_STRICT

public static final int E_STRICT
See Also:
Constant Field Values

E_RECOVERABLE_ERROR

public static final int E_RECOVERABLE_ERROR
See Also:
Constant Field Values

ARGS

public static final StringValue ARGS

CLASS

public static final StringValue CLASS

FILE

public static final StringValue FILE

FUNCTION

public static final StringValue FUNCTION

LINE

public static final StringValue LINE

TYPE

public static final StringValue TYPE
Constructor Detail

ErrorModule

public ErrorModule()
Method Detail

getIniDefinitions

public IniDefinitions getIniDefinitions()
Returns the default php.ini values.

Specified by:
getIniDefinitions in interface QuercusModule
Overrides:
getIniDefinitions in class AbstractQuercusModule

die

public static Value die(Env env,
                        java.lang.String msg)
Exits


debug_backtrace

public static Value debug_backtrace(Env env)
Produces a backtrace


exit

public Value exit(Env env,
                  Value msg)
Exits


error_log

public static boolean error_log(Env env,
                                StringValue message,
                                int type,
                                StringValue destination,
                                StringValue extraHeaders)
Send a message to the log.


error_reporting

public static long error_reporting(Env env,
                                   Value levelV)
Changes the error reporting value.


restore_error_handler

public static boolean restore_error_handler(Env env)
Restores the error handler

Parameters:
env - the quercus environment

set_error_handler

public static boolean set_error_handler(Env env,
                                        Callable fun,
                                        int errorMask)
Sets an error handler

Parameters:
env - the quercus environment
fun - the error handler
code - errorMask error level

set_exception_handler

public static Value set_exception_handler(Env env,
                                          Callable fun)
Sets an exception handler

Parameters:
env - the quercus environment
fun - the exception handler

restore_exception_handler

public static Value restore_exception_handler(Env env)
Restore an exception handler

Parameters:
env - the quercus environment

trigger_error

public static Value trigger_error(Env env,
                                  java.lang.String msg,
                                  int code)
Triggers an error.

Parameters:
env - the quercus environment
msg - the error message
code - the error level

user_error

public Value user_error(Env env,
                        java.lang.String msg,
                        int code)
Triggers an error.

Parameters:
env - the quercus environment
msg - the error message
code - the error level