Workflow::Exception man page on Fedora

Man page or keyword search:  
man Server   31170 pages
apropos Keyword Search (all sections)
Output format
Fedora logo
[printable version]

Workflow::Exception(3)User Contributed Perl DocumentatioWorkflow::Exception(3)

NAME
       Workflow::Exception - Base class for workflow exceptions

VERSION
       This documentation describes version 1.08 of this package

SYNOPSIS
	# Standard usage
	use Workflow::Exception qw( workflow_error );

	my $user = $wf->context->param( 'current_user' );
	unless ( $user->check_password( $entered_password ) ) {
	  workflow_error "User exists but password check failed";
	}

	# Pass a list of strings to form the message

	unless ( $user->check_password( $entered_password ) ) {
	  workflow_error 'Bad login: ', $object->login_attempted;
	}

	# Using other exported shortcuts

	use Workflow::Exception qw( configuration_error );
	configuration_error "Field 'foo' must be a set to 'bar'";

	use Workflow::Exception qw( validation_error );
	validation_error "Validation for field 'foo' failed: $error";

DESCRIPTION
       First, you should probably look at Exception::Class for more usage
       examples, why we use exceptions, what they are intended for, etc.

       This is the base class for all workflow exceptions. It declares a
       handful of exceptions and provides shortcuts to make raising an
       exception easier and more readable.

METHODS
       throw( @msg, [ \%params ])

       This overrides throw() from Exception::Class to add a little syntactic
       sugar. Instead of:

	$exception_class->throw( message => 'This is my very long error message that I would like to pass',
				 param1	 => 'Param1 value',
				 param2	 => 'Param2 value' );

       You can use:

	$exception_class->throw( 'This is my very long error message ',
				 'that I would like to pass',
				 { param1 => 'Param1 value',
				   param2 => 'Param2 value' } );

       And everything will work the same. Combined with the SHORTCUTS this
       makes for very readable code:

	workflow_error "Something went horribly, terribly, dreadfully, "
		       "frightfully wrong: $@",
		       { foo => 'bar' };

       condition_error

       This method transforms the error to a condition error.

       This exception is thrown via </mythrow> when a condition of a workflow
       is invalid.

       configuration_error

       This method transforms the error to a configuration error.

       This exception is thrown via </mythrow> when configuration of a
       workflow is unsuccessful.

       persist_error

       This method transforms the error to a persistance error.

       This exception is thrown via </mythrow> when the save of a workflow is
       unsuccessful.

       validation_error

       This method transforms the error to a validation error.

       This exception is thrown via </mythrow> when input data or similar of a
       workflow is unsuccessful.

       workflow_error

       This method transforms the error to a workflow error.

       This exception is thrown via </mythrow> when input data or similar of a
       workflow is unsuccessful.

SHORTCUTS
       Workflow::Exception - import using "workflow_error"

       Workflow::Exception::Condition - import using "condition_error"

       Workflow::Exception::Configuration - import using "configuration_error"

       Workflow::Exception::Persist - import using "persist_error"

       Workflow::Exception::Validation - import using "validation_error"

SEE ALSO
       Exception::Class

COPYRIGHT
       Copyright (c) 2003-2004 Chris Winters. All rights reserved.

       This library is free software; you can redistribute it and/or modify it
       under the same terms as Perl itself.

AUTHORS
       Chris Winters <chris@cwinters.com>

perl v5.14.1			  2011-07-21		Workflow::Exception(3)
[top]

List of man pages available for Fedora

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net