Help for this page

Select Code to Download


  1. or download this
    /tmp>cat error.c
    #include <stdio.h>
    ...
    failed to open foo: No such file or directory
    
    /tmp>
    
  2. or download this
    try {
        line = console.readLine();
    ...
    finally {
        console.printLine("The program is now terminating.");
    }
    
  3. or download this
    use Try::Tiny;
    $dbh->{AutoCommit} = 0;  # enable transactions, if possible
    ...
        eval { $dbh->rollback };
        # add other application on-error-clean-up code here
    };
    
  4. or download this
    $h->method(@args) or die $h->errstr;