From: Pascal <pb...@oi...> - 2001-02-15 15:00:19
|
I'll see if I can implement this error handling into the DynAPI. does it work crossbrowser? (ie4+ and NS4+) Pascal Bestebroer (pb...@oi...) Software ontwikkelaar Oberon Informatiesystemen b.v. http://www.oibv.com > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Michael > Pemberton > Verzonden: donderdag 15 februari 2001 7:22 > Aan: dyn...@li... > Onderwerp: Re: [Dynapi-Dev] A handy DEBUG method > > > I've got an alternative method that caches the errors until > everything has > loaded and generates a error output page. It can also be > told to display > javascript errors or even catch and not display javascript errors. > > DynAPI { > errors : [], > displayerrors : false, // indicates if you wish all > errors to be caught or > sent to the in-built js console > errorHandler : function (msg, url, lno) { > DynAPI.errors[DynAPI.errors.length] = [url,lno,msg]; > // if the page has already loaded, errors will be > alerted instead of > sent to the debug page > if (DynAPI.loaded&&DynAPI.displayerrors) > alert("Error in '" + url + "'.\nLine number: " + lno + > ".\nMessage: " + msg); > return DynAPI.displayerrors; > }, > > // The following line is added at the end of the loadHandler: > if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); > > // The following line is added at the end of the dynapi.js > onerror = DynAPI.errorHandler; > > -- > Michael Pemberton > mp...@ph... > ICQ: 12107010 > > > > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > |
From: Matthew A. S. <ms...@sh...> - 2001-02-15 17:04:41
|
Yeah, that's pretty much how we do it. This happens for us without the user even knowing it. They just get a friendly error message. M. -----Original Message----- From: Doug Melvin [mailto:do...@cr...] Sent: Thursday, February 15, 2001 11:32 AM To: dyn...@li... Subject: Re: [Dynapi-Dev] A handy DEBUG method very good idea.. There are only two ways to go about it tho (That I know of), one would be a dialog "Do you wish to send a debug report?" if they answer yes, then bring up their email client (mailto:ar...@ar...) OR you would have to use a server side component of some sort.. I have an 'email us' form on some of my client site which use IIS and ASP to send the message via the server: The following code is the asp (server side) code to send an email. Note: You need to have SMTP installed on the NT/win2k server. <% Dim MyMail Set MyMail =3D Server.CreateObject("CDONTS.NewMail") MyMail.From =3D de...@de... MyMail.To =3D ar...@ar... MyMail.Subject =3D "an error report" MyMail.BodyFormat =3D 1 'text? MyMail.MailFormat =3D 1 MyMail.Body =3D "Error message..." MyMail.Send Set MyMail =3D Nothing response.redirect("thankyou_home.html") %> ----- Original Message ----- From: "Jim Foster" <jf...@tm...> To: <dyn...@li...> Sent: Thursday, February 15, 2001 7:30 AM Subject: Re: [Dynapi-Dev] A handy DEBUG method > I have been doing something very similar. I have thought about taking it to > the next level and making it so that errorHandler actually sends the message > (url,lno,msg) to me (the developer) via e-mail in the background, but > returns true to the application so that the user is unaware that an error > occurred. This way once the application is deployed I can keep a pulse on > errors in the real world and take care of errors missed in the testing, yet > the user is not hindered since all of this notification happens in the > background. > > Any thoughts on implementation? > > Jim > > > ----- Original Message ----- > From: "Michael Pemberton" <mp...@ph...> > To: <dyn...@li...> > Sent: Wednesday, February 14, 2001 11:21 PM > Subject: Re: [Dynapi-Dev] A handy DEBUG method > > > > I've got an alternative method that caches the errors until everything has > > loaded and generates a error output page. It can also be told to display > > javascript errors or even catch and not display javascript errors. > > > > DynAPI { > > errors : [], > > displayerrors : false, // indicates if you wish all errors to be > caught or > > sent to the in-built js console > > errorHandler : function (msg, url, lno) { > > DynAPI.errors[DynAPI.errors.length] =3D [url,lno,msg]; > > // if the page has already loaded, errors will be alerted instead > of > > sent to the debug page > > if (DynAPI.loaded&&DynAPI.displayerrors) > > alert("Error in '" + url + "'.\nLine number: " + lno + > > ".\nMessage: " + msg); > > return DynAPI.displayerrors; > > }, > > > > // The following line is added at the end of the loadHandler: > > if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); > > > > // The following line is added at the end of the dynapi.js > > onerror =3D DynAPI.errorHandler; > > > > -- > > Michael Pemberton > > mp...@ph... > > ICQ: 12107010 > > > > > > > > > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev --- Outgoing mail is certified Virus Free by AVG Free Edition http://www.grisoft.com/html/us_index.cfm Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.231 / Virus Database: 112 - Release Date: 2/12/01 _______________________________________________ Dynapi-Dev mailing list Dyn...@li... http://lists.sourceforge.net/lists/listinfo/dynapi-dev |
From: Robert R. <rra...@ya...> - 2001-02-15 16:10:04
|
It could possibly be included as an extension. Maybe replace debug.js with this (if it works), since console.js it sort of a replacement for debug.js anyways. -- // Robert Rainwater On 2/15/2001, 10:00:10 AM EST, Pascal wrote about "[Dynapi-Dev] A handy DEBUG method": > I'll see if I can implement this error handling into the DynAPI. > does it work crossbrowser? (ie4+ and NS4+) > Pascal Bestebroer (pb...@oi...) > Software ontwikkelaar > Oberon Informatiesystemen b.v. > http://www.oibv.com >> -----Oorspronkelijk bericht----- >> Van: dyn...@li... >> [mailto:dyn...@li...]Namens Michael >> Pemberton >> Verzonden: donderdag 15 februari 2001 7:22 >> Aan: dyn...@li... >> Onderwerp: Re: [Dynapi-Dev] A handy DEBUG method >> >> >> I've got an alternative method that caches the errors until >> everything has >> loaded and generates a error output page. It can also be >> told to display >> javascript errors or even catch and not display javascript errors. >> >> DynAPI { >> errors : [], >> displayerrors : false, // indicates if you wish all >> errors to be caught or >> sent to the in-built js console >> errorHandler : function (msg, url, lno) { >> DynAPI.errors[DynAPI.errors.length] = [url,lno,msg]; >> // if the page has already loaded, errors will be >> alerted instead of >> sent to the debug page >> if (DynAPI.loaded&&DynAPI.displayerrors) >> alert("Error in '" + url + "'.\nLine number: " + lno + >> ".\nMessage: " + msg); >> return DynAPI.displayerrors; >> }, >> >> // The following line is added at the end of the loadHandler: >> if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); >> >> // The following line is added at the end of the dynapi.js >> onerror = DynAPI.errorHandler; >> >> -- >> Michael Pemberton >> mp...@ph... >> ICQ: 12107010 >> >> >> >> >> >> >> _______________________________________________ >> Dynapi-Dev mailing list >> Dyn...@li... >> http://lists.sourceforge.net/lists/listinfo/dynapi-dev >> > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev ---------------------- DynAPI Snapshots: http://dynapi.sourceforge.net/snapshot/ DynAPI Homepage: http://dynapi.sourceforge.net/ |
From: Pascal B. <pa...@dy...> - 2001-02-15 18:05:41
|
wasn't thinking about extension.. but more like trapping errors from within the dynapi.. not with a console, but with a nicer alert. We could then make even the error messages cross-browser (IE is always wrong by 1 line) I'd rather see a nice alert box then those annoying IE screens (which some people have turned off btw.) So, not a comple console like window as in Michael's example, but a normal alert box stating the correct line nr and message. Pascal Bestebroer pa...@dy... http://www.dynamic-core.net > -----Oorspronkelijk bericht----- > Van: dyn...@li... > [mailto:dyn...@li...]Namens Robert Rainwater > Verzonden: donderdag 15 februari 2001 17:12 > Aan: DynAPI Development List > Onderwerp: Re[2]: [Dynapi-Dev] A handy DEBUG method > > > > It could possibly be included as an extension. Maybe replace debug.js > with this (if it works), since console.js it sort of a replacement for > debug.js anyways. > > -- > // Robert Rainwater > > On 2/15/2001, 10:00:10 AM EST, Pascal wrote about "[Dynapi-Dev] A > handy DEBUG method": > > > I'll see if I can implement this error handling into the DynAPI. > > > does it work crossbrowser? (ie4+ and NS4+) > > > > Pascal Bestebroer (pb...@oi...) > > Software ontwikkelaar > > Oberon Informatiesystemen b.v. > > http://www.oibv.com > > >> -----Oorspronkelijk bericht----- > >> Van: dyn...@li... > >> [mailto:dyn...@li...]Namens Michael > >> Pemberton > >> Verzonden: donderdag 15 februari 2001 7:22 > >> Aan: dyn...@li... > >> Onderwerp: Re: [Dynapi-Dev] A handy DEBUG method > >> > >> > >> I've got an alternative method that caches the errors until > >> everything has > >> loaded and generates a error output page. It can also be > >> told to display > >> javascript errors or even catch and not display javascript errors. > >> > >> DynAPI { > >> errors : [], > >> displayerrors : false, // indicates if you wish all > >> errors to be caught or > >> sent to the in-built js console > >> errorHandler : function (msg, url, lno) { > >> DynAPI.errors[DynAPI.errors.length] = [url,lno,msg]; > >> // if the page has already loaded, errors will be > >> alerted instead of > >> sent to the debug page > >> if (DynAPI.loaded&&DynAPI.displayerrors) > >> alert("Error in '" + url + "'.\nLine number: " + lno + > >> ".\nMessage: " + msg); > >> return DynAPI.displayerrors; > >> }, > >> > >> // The following line is added at the end of the loadHandler: > >> if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); > >> > >> // The following line is added at the end of the dynapi.js > >> onerror = DynAPI.errorHandler; > >> > >> -- > >> Michael Pemberton > >> mp...@ph... > >> ICQ: 12107010 > >> > >> > >> > >> > >> > >> > >> _______________________________________________ > >> Dynapi-Dev mailing list > >> Dyn...@li... > >> http://lists.sourceforge.net/lists/listinfo/dynapi-dev > >> > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > ---------------------- > DynAPI Snapshots: http://dynapi.sourceforge.net/snapshot/ > DynAPI Homepage: http://dynapi.sourceforge.net/ > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > |
From: Michael P. <mp...@ph...> - 2001-02-15 23:47:14
|
the console appearring could be a separate option that can be set by the coder. Pascal Bestebroer wrote: > wasn't thinking about extension.. > > but more like trapping errors from within the dynapi.. not with a console, > but with a nicer alert. > We could then make even the error messages cross-browser (IE is always wrong > by 1 line) > > I'd rather see a nice alert box then those annoying IE screens (which some > people have turned off btw.) > > So, not a comple console like window as in Michael's example, but a normal > alert box stating the correct line > nr and message. > > Pascal Bestebroer > pa...@dy... > http://www.dynamic-core.net > > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... > > [mailto:dyn...@li...]Namens Robert Rainwater > > Verzonden: donderdag 15 februari 2001 17:12 > > Aan: DynAPI Development List > > Onderwerp: Re[2]: [Dynapi-Dev] A handy DEBUG method > > > > > > > > It could possibly be included as an extension. Maybe replace debug.js > > with this (if it works), since console.js it sort of a replacement for > > debug.js anyways. > > > > -- > > // Robert Rainwater > > > > On 2/15/2001, 10:00:10 AM EST, Pascal wrote about "[Dynapi-Dev] A > > handy DEBUG method": > > > > > I'll see if I can implement this error handling into the DynAPI. > > > > > does it work crossbrowser? (ie4+ and NS4+) > > > > > > > Pascal Bestebroer (pb...@oi...) > > > Software ontwikkelaar > > > Oberon Informatiesystemen b.v. > > > http://www.oibv.com > > > > >> -----Oorspronkelijk bericht----- > > >> Van: dyn...@li... > > >> [mailto:dyn...@li...]Namens Michael > > >> Pemberton > > >> Verzonden: donderdag 15 februari 2001 7:22 > > >> Aan: dyn...@li... > > >> Onderwerp: Re: [Dynapi-Dev] A handy DEBUG method > > >> > > >> > > >> I've got an alternative method that caches the errors until > > >> everything has > > >> loaded and generates a error output page. It can also be > > >> told to display > > >> javascript errors or even catch and not display javascript errors. > > >> > > >> DynAPI { > > >> errors : [], > > >> displayerrors : false, // indicates if you wish all > > >> errors to be caught or > > >> sent to the in-built js console > > >> errorHandler : function (msg, url, lno) { > > >> DynAPI.errors[DynAPI.errors.length] = [url,lno,msg]; > > >> // if the page has already loaded, errors will be > > >> alerted instead of > > >> sent to the debug page > > >> if (DynAPI.loaded&&DynAPI.displayerrors) > > >> alert("Error in '" + url + "'.\nLine number: " + lno + > > >> ".\nMessage: " + msg); > > >> return DynAPI.displayerrors; > > >> }, > > >> > > >> // The following line is added at the end of the loadHandler: > > >> if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); > > >> > > >> // The following line is added at the end of the dynapi.js > > >> onerror = DynAPI.errorHandler; > > >> > > >> -- > > >> Michael Pemberton > > >> mp...@ph... > > >> ICQ: 12107010 > > >> > > >> > > >> > > >> > > >> > > >> > > >> _______________________________________________ > > >> Dynapi-Dev mailing list > > >> Dyn...@li... > > >> http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > >> > > > > > > > _______________________________________________ > > > Dynapi-Dev mailing list > > > Dyn...@li... > > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > > > ---------------------- > > DynAPI Snapshots: http://dynapi.sourceforge.net/snapshot/ > > DynAPI Homepage: http://dynapi.sourceforge.net/ > > > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev -- Michael Pemberton mp...@ph... ICQ: 12107010 |
From: Michael P. <mp...@ph...> - 2001-02-15 23:45:27
|
yeahit does. I've been using it in my version for months. I just thought it might be too much to include in the core API. : ) Pascal wrote: > I'll see if I can implement this error handling into the DynAPI. > > does it work crossbrowser? (ie4+ and NS4+) > > Pascal Bestebroer (pb...@oi...) > Software ontwikkelaar > Oberon Informatiesystemen b.v. > http://www.oibv.com > > > -----Oorspronkelijk bericht----- > > Van: dyn...@li... > > [mailto:dyn...@li...]Namens Michael > > Pemberton > > Verzonden: donderdag 15 februari 2001 7:22 > > Aan: dyn...@li... > > Onderwerp: Re: [Dynapi-Dev] A handy DEBUG method > > > > > > I've got an alternative method that caches the errors until > > everything has > > loaded and generates a error output page. It can also be > > told to display > > javascript errors or even catch and not display javascript errors. > > > > DynAPI { > > errors : [], > > displayerrors : false, // indicates if you wish all > > errors to be caught or > > sent to the in-built js console > > errorHandler : function (msg, url, lno) { > > DynAPI.errors[DynAPI.errors.length] = [url,lno,msg]; > > // if the page has already loaded, errors will be > > alerted instead of > > sent to the debug page > > if (DynAPI.loaded&&DynAPI.displayerrors) > > alert("Error in '" + url + "'.\nLine number: " + lno + > > ".\nMessage: " + msg); > > return DynAPI.displayerrors; > > }, > > > > // The following line is added at the end of the loadHandler: > > if (DynAPI.errors.length&&DynAPI.displayerrors) DynAPI.errorOutput(); > > > > // The following line is added at the end of the dynapi.js > > onerror = DynAPI.errorHandler; > > > > -- > > Michael Pemberton > > mp...@ph... > > ICQ: 12107010 > > > > > > > > > > > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/lists/listinfo/dynapi-dev > > > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/lists/listinfo/dynapi-dev -- Michael Pemberton mp...@ph... ICQ: 12107010 |