++ed by:

2 non-PAUSE user(s).

Andrew Johnson
and 1 contributors

NAME

Helios::Error::Fatal - fatal exception class for Helios indicating a job failed but can be re-attempted

SYNOPSIS

        # in dodgy code:

        use Error qw(:try);

        sub dodgy {

                if ($something_bad) {
                        throw Helios::Error::Fatal("This job failed");
                }
        }


        # in the caller of the dodgy code:

        use Error qw(:try);

        try {
                dodgy(@params);
        } catch Helios::Error::Fatal with {
                my $e = shift;
                $self->logMsg( $e->text() );
                $self->failedJob( $job, $e->text() );
        };

DESCRIPTION

Helios::Error::Fatal can be used to identify errors that were severe enough to cause a job to fail. This implies an error that should be logged and the Schwartz job in question should be marked as failed (with the $job->failed() method). If your Worker class supports retrying failed jobs (overriding the max_retries() method), the system will retry the job up to the number times returned by max_retries().

Compare this to Helios::Error::FatalNoRetry, which implies a similar circumstance except the error is severe enough to prevent the system from re-attempting the job later.

SEE ALSO

Helios::Error::FatalNoRetry, Helios::Error::Warning, Helios::Error::BaseError, Error, Error::Simple

AUTHOR

Andrew Johnson, <ajohnson@ittoolbox.com>

COPYRIGHT AND LICENSE

Copyright (C) 2007-8 by CEB Toolbox, Inc.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.0 or, at your option, any later version of Perl 5 you may have available.

WARRANTY

This software comes with no warranty of any kind.