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:
show all problem (1997)
Emailer setup (1997)
No luck with taxes (1997)
Re:2nd WebCatalog2 Feature Request (1996)
[WebDNA] PCI Vulnerability testing (2009)
Mac 2.1b4 unknown error: BadSuffix (1997)
Dummy Form Variables Needed (2000)
[WebDNA] Performance impact of stock functions (2011)
Webcatalog error, Plug-in for Webstar (1996)
WC2.0 Memory Requirements (1997)
WebCat2b13MacPlugIn - More limits on [include] (1997)
Frames and WebCat (1997)
Re:HELP - NONE STOP DIGESTS. Digest for 4/24/97) (1997)
More on the email templates (1997)
Payment calculator ?? (2000)
[SetHeader] docs? (1997)
stumped (2001)
Show items based on login Password (2003)
Seeking NT Mail Server Experiences (1998)
WebCat for Unix?? (1997)