comparison Lib/IMPL/Web/Exception.pm @ 197:6b1dda998839

Added IMPL::declare, IMPL::require, to simplify module definitions IMPL::Transform now admires object inheritance while searching for the transformation Added HTTP some exceptions IMPL::Web::Application::RestResource almost implemented
author sergey
date Thu, 19 Apr 2012 02:10:02 +0400
parents
children c8fe3f84feba
comparison
equal deleted inserted replaced
196:a705e848dcc7 197:6b1dda998839
1 package IMPL::Web::Exception;
2 use strict;
3 use warnings;
4
5 use parent qw(IMPL::Exception);
6
7 __PACKAGE__->PassThroughArgs;
8
9 sub code {
10 400;
11 }
12
13 1;
14
15 __END__
16
17 =pod
18
19 =head1 NAME
20
21 C<IMPL::Web::Exception> - Базовый класс для всех web-исключенийю
22
23 =head1 SYNOPSIS
24
25 Вызов исключения
26
27 =begin code
28
29 use IMPL::require {
30 WebException => 'IMPL::Web::WebException'
31 };
32
33 sub MyWebHandler {
34 # ...
35
36 die WebException->new("something is wrong");
37
38 # ...
39 }
40
41 =end code
42
43 =head1 MEMBERS
44
45 =head2 C<code()>
46
47 Возвращает C<HTTP> код ошибки.
48
49 =cut