Error/Exception Handling and Testing/Debugging Flashcards
Define Logic
the order in which parts of code execute/run
Define Syntax Error/Parse Error
the scripting engine fails to recognise code
Define Run-Time Error
the scripting error encounters an error while the program is executing
Define Logic Error
scripting engine doesn’t behave as it should
What are the three categories of error types?
notice
warning
fatal
What is a Notice error type?
a harmless problem. Can be involved using explicit programming
What is a Warning error type?
something is clearly wrong and action should be taken
What is a Fatal error type?
something has gone terribly wrong and processing cannot continue
what does error_reporting do?
says which types of error messages PHP should generate
what does log_errors do?
PHP logs errors into a file. Is assigned the default value “off”
display_errors
prints errors to screen (stdout) and could be assigned to stderr
display_startup_errors
displays errors that occur when PHP first starts. Assigned to default value “off”
What is the structure of an error handler?
error_function_name(error_level, error_message, error_file, error_line, error_context)
which two attributes are required in an error handler?
error_level and error_message
what does error_level do
specifies error report level for user_defined errors. Must be a value number