Andrew Johnson > Helios-2.61 > Helios::Error::Warning

Download:
Helios-2.61.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Module Version: 2.61   Source   Latest Release: Helios-2.82

NAME ^

Helios::Error::Warning - exception class for Helios indicating a job was successful but it encountered errors during processing

SYNOPSIS ^

        # in dodgy code:

        use Error qw(:try);

        sub dodgy {

                ... dodgy stuff ...


                if ($success_but_a_bit_off) {
                        throw Helios::Error::Warning("This job succeeded with errors");
                }
        }


        # in the caller of the dodgy code:

        use Error qw(:try);

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

DESCRIPTION ^

Helios::Error::Warning can be used to identify errors that were not severe enough to cause a job to fail, but probably should be logged. Normally this would mean simply logging the error, and calling the $job->completed() method as normal.

Compare this to Helios::Error::Fatal and FatalNoRetry, which imply errors that caused the job to fail completely.

SEE ALSO ^

Helios::Error::FatalNoRetry, Helios::Error::Fatal, 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.

syntax highlighting: