Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: Error codes information


Message #1 by "Joe Fawcett" <joefawcett@h...> on Mon, 20 Aug 2001 11:22:28 +0100
--- Joe Fawcett <joefawcett@h...> wrote:
> Thank you Daniel but what I need is a breakdown of
> the error number into 
> its constituent parts. I know each of the bits
> carries information, I just 
> can't find a simple way of constructing my own
> number. e.g. If my 
> component is unable to process a request because an
> argument was specified 
> incorrectly, I can make my own Error up :
> var oError = new Error(iNumber, "Argument was not in
> correct format, must be a string");
> But what is the correct number to fit in with other
> errors defned in 
> winerror.h?
> 
> Regards
> 
> Joe Fawcett
> 
> 
> 
  I'd like to help you, but I think I don't understand
correctly what you mean. Probably you want to parse
errors and customize their messages to the user. I
will try to create a function that breaks the error
number, retaining the parts that are needed. If you
could provide more information about what oyu want to
do I will try to get some documentation. Thanks!
  Daniel

> >From: DANIEL RADU <radudanielro@y...>
> >Reply-To: "javascript" <javascript@p...>
> >To: "javascript" <javascript@p...>
> >Subject: [javascript] Re: Error codes information
> >Date: Tue, 21 Aug 2001 01:06:12 -0700 (PDT)
> >
> >--- Joe Fawcett <joefawcett@h...> wrote:
> > > Can anyone shed some light on error codes in
> > > Javascript on a Windows
> > > platform? I know that they have a certain
> structure
> > > and a new component
> > > I'm writing needs to throw various errors. I'm
> > > struggling how to number
> > > them to keep in line with the offiial ones.
> > >
> > > Regards
> > >
> > > Joe Fawcett
> > >
> >   I don't know if i have understood well what you
> >mean.
> >Anyway, may be it will be useful (?):
> >function f()
> >{
> >   try
> >   {
> >     //desired code here...
> >   }
> >   catch(e)
> >   {
> >     alert(e.description + '\n' + e.number);
> >     return;
> >   }
> >}

  Return to Index