NAME

MooseX::Role::Validatable::Error - Base Error class for MooseX::Role::Validatable

SYNOPSIS

use MooseX::Role::Validatable;

  my $error = MooseX::Role::Validatable::Error->new({
      message           => 'Internal debug message.',            # Required
      message_to_client => 'Client-facing message',              # Required
      details           => { field => 'duration' },            # Optional, Must be a HashRef
      set_by            => 'Source of the error',                # Required; MAY default to caller(1)
      severity          => 5,                                    # For ordering, bigger is worse. Defaults to 1.
      transient         => 1,                                    # Boolean, defaults to false
      alert             => 1,                                    # Boolean, defaults to false
      info_link         => 'https://example.com/',               # Client-facing URI for additional info on this error.
  });

DESCRIPTION

Represents an error in validation

ATTRIBUTES

message

A message which might help us figure out what is wrong.

details

An arbitrary optional HashRef to pass the error details.

message_to_client

A client-friendly string describing the error.

set_by

The source of the error.

severity

How bad is it that this happened?

transient

Is this something likely to resolve itself with a little time?

alert

Should someone be alerted when this condition triggers?

A URI for further explanation of the error.

info_text

Description of the info_link

as_html

AUTHOR

Binary.com <fayland@binary.com>

COPYRIGHT

Copyright 2014- Binary.com

LICENSE

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

SEE ALSO