diff Lib/IMPL/Web/Exception.pm @ 229:47f77e6409f7

heavily reworked the resource model of the web application: *some ResourcesContraact functionality moved to Resource +Added CustomResource *Corrected action handlers
author sergey
date Sat, 29 Sep 2012 02:34:47 +0400
parents c8fe3f84feba
children 6d8092d8ce1b
line wrap: on
line diff
--- a/Lib/IMPL/Web/Exception.pm	Thu Sep 13 17:55:01 2012 +0400
+++ b/Lib/IMPL/Web/Exception.pm	Sat Sep 29 02:34:47 2012 +0400
@@ -2,12 +2,18 @@
 use strict;
 use warnings;
 
-use parent qw(IMPL::Exception);
+use IMPL::lang qw(:constants);
+use IMPL::declare {
+	base => [
+	   'IMPL::Exception' => '@_'
+	],
+	props => [
+	   headers => PROP_ALL
+	]
+};
 
-__PACKAGE__->PassThroughArgs;
-
-sub code {
-	400;
+sub status {
+	"500 Internal error";
 }
 
 1;
@@ -43,8 +49,12 @@
 
 =head1 MEMBERS
 
-=head2 C<code()>
+=head2 C<status()>
 
 Возвращает C<HTTP> код ошибки. Каждый класс иключений должен переопределить данный метод.
 
+=head2 C<[get,set]headers>
+
+Ссылка на хеш с параметрами заголовка.
+
 =cut
\ No newline at end of file