NAME

Para::Frame::Result::Part - Representing an individual result as part of the Result object

DESCRIPTION

This object should be a compatible standin for Template::Exception, since it is a container object.

You create a new part by using Para::Frame::Result/error.

Exceptions

denied

Permission denied

dbi

Database or SQL error

update

Problem occured while trying to store data in the DB.

incomplete

Some required field in a HTML form was left blank

validation

A value given in a HTML form was invalid

confirm

Ask for confirmation of something, involving modification of a form in the submitting template

template

Format or execution error in the template page

action

Generic error while executing an action

compilation

A cimpilation error of Perl code

notfound

A page (template) or object was requested but not found

file

Error during file manipulation. This could be a filesystem permission error

new

info

  $part->info

Returns the error info by Template::Exception info().

Compatible with Template::Exception.

type

  $part->type

  $part->type( $type )

Returns the error type by Template::Exception type().

If $type is defined, sets it.

Compatible with Template::Exception.

type_info

text

error_type

error

  $part->error

Returns the Template::Exception object.

title

  $part->title

  $part->title( $title )

Returns the part title.

If $title is defined, sets it.

Defaults to title based on type.

message

  $part->message

  $part->message( $message )

  $part->message( \@messages )

Returns the part message

First all error info, followed by all the part messages. Joined by newline.

If $message is defined, sets it.

hide

  $part->hide

  $part->hide( $bool )

Returns true if this part should not be shown to the normal user.

If $bool is defined, sets it.

Defaults to default for the part type.

border

  $part->border

Returns the border colour for displaying the part, if error.

Defaults to default for error type or black.

bg

  $part->bg

Returns the background colour for displaying the part, if error.

Defaults to default for error type or #AAAAFF.

width

  $part->width

Returns the width of the border (in px) for displaying the part, if error.

Defaults to default fro error type or 3.

view_context

  $part->view_context

  $part->view_context( $bool )

Returns true if we should display the context of the error message.

If $bool is defined, sets it.

Defaults to default for error type or false.

no_backtrack

  $part->no_backtrack

  $part->no_backtrack( $bool )

Returns true if we should not backtrack because of this error, if error.

If $bool is defined, sets it.

Defaults to the default for the error type or false.

context

  $part->context

Returns the context of the part.

context_line

  $part->context_line

Returns the line of the start of the context

set_context

prefix_message

  $part->prefix_message

  $part->prefix_message( $message )

Return a message to prefix the message with.

If $message is defined, sets it.

Defaults to undef.

add_message

  $part->add_message( \@messages )

Adds each message to the message list for the part.

Returns /message.

as_string

  $part->as_string

Returns a representation of the part in plain text format.

as_html

  $part->as_html

Returns a representation of the part in plain html format.

SEE ALSO

Para::Frame