| MooseX::Params::Validate::Exception::ValidationFailedForTypeConstraint(3) | User Contributed Perl Documentation | MooseX::Params::Validate::Exception::ValidationFailedForTypeConstraint(3) | 
MooseX::Params::Validate::Exception::ValidationFailedForTypeConstraint - Exception thrown when a type constraint check fails
version 0.21
    use MooseX::Params::Validate qw( validated_list );
    use Scalar::Util qw( blessed );
    use Try::Tiny;
    try {
        my @p = validated_list( @_, foo => { isa => 'Str' } );
    }
    catch {
        if (
            blessed $_
            && $_->isa(
                'MooseX::Params::Validate::Exception::ValidationFailedForTypeConstraint'
            )
            ) {
            ...;
        }
    };
This class provides information about type constraint failures.
This class provides the following methods:
This returns a string describing the parameter, something like "The 'foo' parameter" or "Parameter #1".
This is the value that failed the type constraint check.
This is the type constraint object that did not accept the value.
This object stringifies to a reasonable error message.
This software is copyright (c) 2013 - 2015 by Stevan Little <stevan@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
| 2015-02-08 | perl v5.34.0 |