Re: Improvements to SOAP warnings and fatal errors

Hi Brian,

On Jul 27, 2007, at 08:55 , Brian Wilson wrote:
> In the SOAP output, there are <m:messageid> elements detailing the  
> error
> codes from the parser, but for warnings and fatal errors this sort of
> thing is not present. It seems that it would be useful to have  
> something
> like this (well...it would be for what I'm doing, but I think it  
> could be
> useful for others that want to store the class of the warning and  
> not the
> full text of the warning itself).
>
> Currently in soap_warnings.tmpl, each warning has a section like:
> <TMPL_IF NAME="W05">
>   <m:warning><m:message>DOCTYPE Override in effect!</m:message></ 
> m:warning>
> </TMPL_IF>
>
> Would it be possible to have something like this instead?:
> <TMPL_IF NAME="W05">
>   <m:warning><m:message>DOCTYPE Override in effect!</m:message>
>              <m:messageid>W05</m:messageid></m:warning>
> </TMPL_IF>

Sounds good, and it would be more consistent that way. I was a quick  
search and replace, copy-paste work, so I've just added it to the  
soap output (in CVS for now).

> I'm not sure (without some extensive digging) where the fatal error  
> output
> is defined, but perhaps something similar could be done for those  
> as well.
> I'm currently doing string matches against the <env:Reason>/<env:Text>
> content when a <env:Fault>/m:exception is encountered, and that  
> solution
> doesn't seem very elegant.

Indeed. Not sure what you mean by "where it is defined" - if you mean  
where, in the code, the fatal error output is triggered, the triggers  
are scattered through the validator code. But each fatal error has an  
id, too, (such as fatal_referer_error, fatal_no_content…) and we  
could be using that as well. Would it make your life easier?

-- 
olivier

Received on Wednesday, 1 August 2007 05:10:10 UTC