OSDN Git Service

Model::Base: 'set_error' can recieve errorno argument
authorhylom <hylom@users.sourceforge.jp>
Wed, 19 Oct 2016 17:54:03 +0000 (02:54 +0900)
committerhylom <hylom@users.sourceforge.jp>
Wed, 19 Oct 2016 17:54:03 +0000 (02:54 +0900)
src/newslash_web/lib/Newslash/Model/Base.pm

index 6f8bf42..92ab222 100644 (file)
@@ -33,8 +33,9 @@ sub new {
 }
 
 sub set_error {
-    my ($self, $error) =@_;
+    my ($self, $error, $errorno) =@_;
     $self->{_error} = $error;
+    $self->{_errorno} = $errorno if $errorno;
 }
 sub set_errorno {
     my ($self, $errorno) =@_;