[MOBY-guts] biomoby commit
José Manuel RodrÃguez Carrasco
jmrc at dev.open-bio.org
Fri Aug 29 16:18:51 UTC 2008
jmrc
Fri Aug 29 12:18:51 EDT 2008
Update of /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception
In directory dev.open-bio.org:/tmp/cvs-serv20192
Modified Files:
MobyException.pm MobyExceptionCodes.pm
Log Message:
* From Exception proposal (v2.02), both 'refQueryID' and 'refElement'
are optional attributes.
We have fixed a bug which a 'refQueryId' was not optional attribute.
* Deleting duplicate exception code in perldoc documentation.
moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception MobyException.pm,1.1,1.2 MobyExceptionCodes.pm,1.1,1.2
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyException.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyException.pm 2008/02/21 00:21:28 1.1
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyException.pm 2008/08/29 16:18:51 1.2
@@ -187,9 +187,12 @@
# Chek if there is article Name
my ($refElement) = '';
- if (defined($self->{refElement}) && ($self->{refElement} ne '')) { $refElement = "refElement='".$self->{refElement}."'" ; }
+ if (exists($self->{refElement}) && defined($self->{refElement}) && ($self->{refElement} ne '')) { $refElement = "refElement='".$self->{refElement}."'" ; }
- $exceptionResponse = "<mobyException refQueryID='".$self->{queryID}."' $refElement severity='information'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$infoMessage</exceptionMessage>\n</mobyException>";
+ my ($refQueryID) = '';
+ if (exists($self->{queryID}) && defined($self->{queryID}) && ($self->{queryID} ne '')) { $refQueryID = "refQueryID='".$self->{queryID}."'" ; }
+
+ $exceptionResponse = "<mobyException $refQueryID $refElement severity='information'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$infoMessage</exceptionMessage>\n</mobyException>";
} else {
@@ -200,8 +203,11 @@
croak("code of exception is wrong or does not exists") unless(defined($standardMessage));
# Chek if there is article Name
- my ($refElement) = '';
- if (defined($self->{refElement}) && ($self->{refElement} ne '')) { $refElement = "refElement='".$self->{refElement}."'" ; }
+ my ($refElement) = '';
+ if (exists($self->{refElement}) && defined($self->{refElement}) && ($self->{refElement} ne '')) { $refElement = "refElement='".$self->{refElement}."'" ; }
+
+ my ($refQueryID) = '';
+ if (exists($self->{queryID}) && defined($self->{queryID}) && ($self->{queryID} ne '')) { $refQueryID = "refQueryID='".$self->{queryID}."'" ; }
# User could add dynamic message into satandard exception message
my ($exceptionMessage) = (defined($self->{message})) ? $standardMessage.$self->{message} : $standardMessage;
@@ -209,11 +215,11 @@
if (defined($self->{type}) && ($self->{type} eq 'warning' || $self->{type} eq 'error')) {
if ($self->{type} eq 'error') {
- $exceptionResponse = "<mobyException refQueryID='".$self->{queryID}."' $refElement severity='error'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$exceptionMessage</exceptionMessage>\n</mobyException>";
+ $exceptionResponse = "<mobyException $refQueryID $refElement severity='error'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$exceptionMessage</exceptionMessage>\n</mobyException>";
} elsif ($self->{type} eq 'warning') {
- $exceptionResponse = "<mobyException refQueryID='".$self->{queryID}."' $refElement severity='warning'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$exceptionMessage</exceptionMessage>\n</mobyException>";
+ $exceptionResponse = "<mobyException $refQueryID $refElement severity='warning'>\n\t<exceptionCode>".$self->{code}."</exceptionCode>\n\t<exceptionMessage>$exceptionMessage</exceptionMessage>\n</mobyException>";
} else {
croak("type of exception is wrong or does not exists");
===================================================================
RCS file: /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyExceptionCodes.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyExceptionCodes.pm 2008/02/21 00:21:28 1.1
+++ /home/repository/moby/moby-live/Perl/MOBY-Server/lib/MOBY/Client/Exception/MobyExceptionCodes.pm 2008/08/29 16:18:51 1.2
@@ -357,11 +357,6 @@
<td>Service require parameter X</td>
</tr>
<tr align="left" valign="top" bgcolor="#eeeeee">
- <td>221</td>
- <td>INPUT_REQUIRED_PARAMETER</td>
- <td>Service require parameter X</td>
- </tr>
- <tr align="left" valign="top" bgcolor="#eeeeee">
<td>222</td>
<td>INPUT_INCORRECT_PARAMETER</td>
<td>Incorrect parameter X</td>
More information about the MOBY-guts
mailing list