[Solved - with code] catching WebDNA error messages

This WebDNA talk-list message is from

2003


It keeps the original formatting.
numero = 49405
interpreted = N
texte = Hi all,Thanks again to Pedro for helping out with this one.If anyone is interested in the code for doing this, here is what I came up with:[Hideif [FormVariables]page=[/FormVariables]] [FileInfo file=eStore/[page].inc] [If [Exists]=T] [Then] [Include file=eStore/[page].inc] [/Then] [Else] [Redirect url=index.html] [/Else] [/If] [/FileInfo] [/Hideif] [Showif [FormVariables]page=[/FormVariables]] [Redirect url=index.html] [/Showif]-lucasOn Wednesday, April 9, 2003, at 02:25 PM, Lucas Rockwell wrote:> Pedro, > > Cool. This looks like it will work. > > Thanks! > > -lucas > > On Wednesday, April 9, 2003, at 01:07 PM, Pedro Rivera wrote: > >> You can do a [Fileinfo file=[page].inc][Exists][/FileInfo] >> [Exists]returns T/F depending if the file exists or not. >> >> Give that a shot with some [showif] or [hideif]. >> P.S. This is just off the top of my head... might not be the right >> syntax >> >> Pedro Rivera >> Webmaster - Programmer >> www.pssl.com >> pedror@pssl.com >> 714-891-3990 Ext. 8174 >> 11070 Valley View St. >> Cypress CA. 90630 >> >> >> >> -----Original Message----- >> From: Lucas Rockwell [mailto:lucasr@tsw.berkeley.edu] >> Sent: Wednesday, April 09, 2003 12:33 PM >> To: WebDNA-Talk@talk.smithmicro.com >> Subject: Re: catching WebDNA error messages >> >> >> Donovan, >> >> Thanks for that tip. Good thing to know about (I've inherited a system >> and I need to learn more about it...). >> >> This won't, however, work in my case. I am trying to use one template >> file that loads various includes based on a param in he url. The value >> of the param is actually the name of the include file, like this: >> >> about.tpl?page=service (includes >> service.inc) >> about.tpl?page=hours (includes >> hours.inc) >> >> Using [FormVariables ] I am able to catch errors like: >> >> about.tpl?pa >> about.tpl? >> etc. >> >> but I can not catch an error like: >> >> about.tpl?page=eligibilityx >> >> with the above, I get the Error: template 'eStore/eligibilityx.inc' >> not found >> >> Does [Include ] have any feedback that I can check to see if it found >> the file it was supposed to include? >> >> -lucas >> >> On Wednesday, April 9, 2003, at 11:02 AM, Donovan wrote: >> >>> You can edit the errormessages.db to do anything you want. (such as >>> redirect to a better error page) >>> >>> Donovan >>> >>> >>> Lucas Rockwell wrote: >>> >>>> Hi all, >>>> >>>> I would like to be able to catch WebDNA error messages and I have >>>> not >>>> found out how yet. Basically, when WebDNA produces an error, like: >>>> >>>> Error: template 'eStore/eligibilityx.inc' not >>>> found >>>> >>>> I want to catch it so it does not appear on the screen. Just turning >>>> them off is not acceptable (if that is even possible). I want to be >>>> able to check for an error and produce a message for the user. >>>> >>>> Does anyone know how to do this? >>>> >>>> Thanks! >>>> >>>> -lucas >>>> >>>> >>>> ------------------------------------------------------------- >>> >>> >>> >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. [Solved - with code] catching WebDNA error messages (Lucas Rockwell 2003)
Hi all,Thanks again to Pedro for helping out with this one.If anyone is interested in the code for doing this, here is what I came up with:[Hideif [formvariables]page=[/FormVariables]] [FileInfo file=eStore/[page].inc] [If [Exists]=T] [Then] [Include file=eStore/[page].inc] [/Then] [Else] [Redirect url=index.html] [/Else] [/If] [/FileInfo] [/Hideif] [Showif [formvariables]page=[/FormVariables]] [Redirect url=index.html] [/Showif]-lucasOn Wednesday, April 9, 2003, at 02:25 PM, Lucas Rockwell wrote:> Pedro, > > Cool. This looks like it will work. > > Thanks! > > -lucas > > On Wednesday, April 9, 2003, at 01:07 PM, Pedro Rivera wrote: > >> You can do a [Fileinfo file=[page].inc][Exists][/FileInfo] >> [Exists]returns T/F depending if the file exists or not. >> >> Give that a shot with some [showif] or [hideif]. >> P.S. This is just off the top of my head... might not be the right >> syntax >> >> Pedro Rivera >> Webmaster - Programmer >> www.pssl.com >> pedror@pssl.com >> 714-891-3990 Ext. 8174 >> 11070 Valley View St. >> Cypress CA. 90630 >> >> >> >> -----Original Message----- >> From: Lucas Rockwell [mailto:lucasr@tsw.berkeley.edu] >> Sent: Wednesday, April 09, 2003 12:33 PM >> To: WebDNA-Talk@talk.smithmicro.com >> Subject: Re: catching WebDNA error messages >> >> >> Donovan, >> >> Thanks for that tip. Good thing to know about (I've inherited a system >> and I need to learn more about it...). >> >> This won't, however, work in my case. I am trying to use one template >> file that loads various includes based on a param in he url. The value >> of the param is actually the name of the include file, like this: >> >> about.tpl?page=service (includes >> service.inc) >> about.tpl?page=hours (includes >> hours.inc) >> >> Using [FormVariables ] I am able to catch errors like: >> >> about.tpl?pa >> about.tpl? >> etc. >> >> but I can not catch an error like: >> >> about.tpl?page=eligibilityx >> >> with the above, I get the Error: template 'eStore/eligibilityx.inc' >> not found >> >> Does [Include ] have any feedback that I can check to see if it found >> the file it was supposed to include? >> >> -lucas >> >> On Wednesday, April 9, 2003, at 11:02 AM, Donovan wrote: >> >>> You can edit the errormessages.db to do anything you want. (such as >>> redirect to a better error page) >>> >>> Donovan >>> >>> >>> Lucas Rockwell wrote: >>> >>>> Hi all, >>>> >>>> I would like to be able to catch WebDNA error messages and I have >>>> not >>>> found out how yet. Basically, when WebDNA produces an error, like: >>>> >>>> Error: template 'eStore/eligibilityx.inc' not >>>> found >>>> >>>> I want to catch it so it does not appear on the screen. Just turning >>>> them off is not acceptable (if that is even possible). I want to be >>>> able to check for an error and produce a message for the user. >>>> >>>> Does anyone know how to do this? >>>> >>>> Thanks! >>>> >>>> -lucas >>>> >>>> >>>> ------------------------------------------------------------- >>> >>> >>> >>> >>> >>> ------------------------------------------------------------- >>> This message is sent to you because you are subscribed to >>> the mailing list . >>> To unsubscribe, E-mail to: >>> To switch to the DIGEST mode, E-mail to >>> >>> Web Archive of this list is at: http://webdna.smithmicro.com/ >>> >> >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> >> ------------------------------------------------------------- >> This message is sent to you because you are subscribed to >> the mailing list . >> To unsubscribe, E-mail to: >> To switch to the DIGEST mode, E-mail to >> >> Web Archive of this list is at: http://webdna.smithmicro.com/ >> > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > > Web Archive of this list is at: http://webdna.smithmicro.com/ > ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Lucas Rockwell

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

strange [date] behavior (2001) Template Not Found (1998) Multi Actions (1999) INDEXING blank field (2001) WCS Newbie question (1997) WebCat2: Items xx to xx shown, etc. (1997) Emailer help....! (1997) Correct Owners & Permissions? (2000) Listfiles and nothing found (2001) WebCat2b13 Command Reference Doc error (1997) New public beta available (1997) can anyone confirm this behavior? (2003) WebCatalog 402rc2 is now available (2001) Re[2]: Error 551 (2000) Which WebCat is it? (2000) [OT] mozilla / Seamonkey (2007) Grep Search and Replace (2002) How To question on setting up downloads (1997) Cancel Subscription (1996) WC2f3 (1997)