Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Merror 1.4

    Download button

    No screenshots available
    Downloads: 126  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Markus Mazurczak | More programs
    Perl Artistic License / FREE
    February 24th, 2011, 15:15 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Merror description

    OOP errorhandling with stacktracing ability

    Merror is a Perl module that gives you the ability to throw and catch errors in an OOP way. That means if you dont catch errors probably your code will continue running. One big feature of Merror is that it captures a stacktrace when an error occured that you can print out.

    SYNOPSIS

     use Merror;
     
     function create_error {
     my $obj = Merror->new(stackdepth => 16);
     #indicate that an error happened
     $obj->error(1);
     #set an error code
     $obj->ec(-1);
     #set an error description
     $obj->et("This is an error message");
     return($obj);
     }
     
     my $error_obj = create_error();
     #check if an error occured
     if($error_obj->error()) {
     #print out the errorcode (-1)
     print("Errorcode: " . $obj->ec() ."\n");
     #print out the error description (This is an error message)
     print("Error description: " . $obj->et() . "\n");
     #print out the captured stacktrace
     $obj->stacktrace();
     } else {
     print("No error occured\n");
     }



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    Perl module | error handling | stack tracing | error | handler | stack

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM