Re: [WebDNA] try/except
This WebDNA talk-list message is from 2015
It keeps the original formatting.
numero = 111855
interpreted = N
texte = Just edit the correct record in errorMessages.db and it will sendyou email in this situation.Then put the append context inside an html comment to hide it fromthe visitor in case an error is generated.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 01/12/2015 01:00 PM, Brian Burton wrote:> Just discovered a lovely little problem involving appending records to a database, the database having the wrong owner or permissions or whatever (Thanks
Obama Unix> and website users being oblivious to the ugly error message webdna kicked out that displayed at the top of the page. > > steps to reproduce:> create a database that webdna can’t write to because of incorrect permissions (test.db)> > [append db=^data/test.db]field1=yes&field2=no[/append]> will yield:> Error: Permision deny. Unable to append to 'test.db' .Ignoring [Append] context.> > if turns out this works:> [showif [append db=test.db]field1=yes&field2=no[/append]~Error]a problem was encountered[/showif]> > but it’s U.G.L.Y. > > what would be nice:> > [try]> [append db=^data/test.db]field1=yes&field2=no[/append]> [except]> [sendmail to=me&from=webserver] Problems. Problems EVERYWHERE! [/sendmail]> [/except]> [/try]> > > I realize this won’t get used often, but there are occasionally some database operations where failure is not an option, and an admin needs to get alerted directly is something goes wrong. > > -BBB> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list
.> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>
Associated Messages, from the most recent to the oldest:
Just edit the correct record in errorMessages.db and it will sendyou email in this situation.Then put the append context inside an html comment to hide it fromthe visitor in case an error is generated.Regards,Kenneth GromeWebDNA Solutionshttp://www.webdnasolutions.comWeb Database Systems and Linux Server ManagementOn 01/12/2015 01:00 PM, Brian Burton wrote:> Just discovered a lovely little problem involving appending records to a database, the database having the wrong owner or permissions or whatever (Thanks Obama Unix> and website users being oblivious to the ugly error message webdna kicked out that displayed at the top of the page. > > steps to reproduce:> create a database that webdna can’t write to because of incorrect permissions (test.db)> > [append db=^data/test.db]field1=yes&field2=no[/append]> will yield:> Error: Permision deny. Unable to append to 'test.db' .Ignoring [append] context.> > if turns out this works:> [showif [append db=test.db]field1=yes&field2=no[/append]~Error]a problem was encountered[/showif]> > but it’s U.G.L.Y. > > what would be nice:> > [try]> [append db=^data/test.db]field1=yes&field2=no[/append]> [except]> [sendmail to=me&from=webserver] Problems. Problems EVERYWHERE! [/sendmail]> [/except]> [/try]> > > I realize this won’t get used often, but there are occasionally some database operations where failure is not an option, and an admin needs to get alerted directly is something goes wrong. > > -BBB> ---------------------------------------------------------> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us> Bug Reporting: support@webdna.us>
Kenneth Grome
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:
Protect (1997)
setting taxable to true (1997)
calculating tax rates, mail order solutions and version 2 (1997)
shownext & math (1997)
seeminly simple... but beyond my grasp :) (2000)
New WebDNA Example from Olin -- (1998)
WC Database Format (1997)
Webcat no longer supported? (2006)
form crasehes server (1997)
NT Manual (1997)
RE: Web*SSL and WebCatalog (1997)
Sku numbers (1997)
Dummy Credit Card Number for debug? (1997)
Frames and WebCat (1997)
Math with Time (1997)
syntax question, not in online refernce (1997)
emailer (1997)
Where is f2? (1997)
OT: zipcodes (2002)
http upload (2001)