LD SoftwareBespoke Software, Web Design, Security Consultants and Host Services.

Menu

Sentinel
You have been warned!
We have caught 5883 shameful hackers.

NukeSentinel(tm)

Paypal Referral
Sign up for PayPal and start accepting credit card payments instantly.

Link Exchange
Join our free link exchange

Click Here
 
Introduction

Introduction

Introduction -- Using Gtk2_ExceptionDump

About Gtk2_ExceptionDump

Gtk2_ExceptionDump catches and displays common errors and warnings that can be produced in a PHP scripts: PHP errors, notices and warnings as well as PEAR Errors and uncaught exceptions. They are displayed in a Gtk2 window with a tree view, providing the error message and the backtrace with passed parameters.

The most easy thing to do is letting the class handle everything automatically. You can decide which errors should be catched: All, PHP errors, PEAR errors or uncaught exceptions. The following methods need to be called statically to set up error handling:

  • setupExceptionHandler()

  • setupPearErrorHandler()

  • setupPhpErrorHandler()

  • setupAllHandlers()

Example 40-1. Letting Gtk2_ExceptionDump handle all errors

<?php
require_once 'Gtk2/ExceptionDump.php';
Gtk2_ExceptionDump::setupAllHandlers();
?>

Handling exceptions by hand

If you don't want to let Gtk2_ExceptionDump handle errors automatically, you can display the window by hand, e.g. in a catch() statement.

Example 40-2. Catching exceptions by hand

<?php
try {
    //do some stuff that
    //could throw an exception
} catch (Exception $e) {
    require_once 'Gtk2/ExceptionDump.php';
    Gtk2_ExceptionDump::display($e);
}
?>

More examples

As usually, the package has more examples in the doc directory: /path/to/pear/docs/Gtk2_ExceptionDump/examples/.

 

Text Ads
There isn't content right now for this block.

Community Login
Welcome,
Anonymous

Nickname
Password
   

People Online:
Visitors: 62
Members: 1
Total: 63

Online Now:
01 : Monty

Like my code
Then please make a donation.

Which help me produce more free code.


Paypal Verified

Information

Powered by PHP-Nuke

Valid CSS!


Valid Robots.txt

Bad Behavior

[Valid RSS]

[Valid RSS]
You can syndicate our News with backend.php And our Forums with rss.php
You can also access our feeds via Feedburner Site News and LD Software Forums
© 2009 ld-software.co.uk All Rights Reserved.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.49 Seconds