473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Exc Handling and User Friendly, Secure ErrMsgs

In my efforts to design a good Database layer, I've used exceptions and
wanted to implement best practices for this project. Obviously an
uncaught exception creates a Fatal Error and stops execution.

Currently, I see the best scenario, as:
if there is an error in the DB layer, throw a DBexc which effectively,
logs all SQL and problem info. In the catch block, throw a general
error, with a more generic statement, and possibly include a logging ID
or # with it. ( avoids sending SQL statements to the screen )

Does this sound sensible, or the best way to do this ?
other options ?
is is common to use set_error_handler ?
What about recovery ? does execution have to terminate ?

I'm also interested in programming this system, with security in mind,
ie: avoid SQL injection.
I haven't researched it fully, but I have seen posts, reccommending
addslashes(), etc.

I'm using PEAR::DB, and looking forward to any responses.

Jan 18 '06 #1
1 1045
Any feed back on this topic ?

Jan 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
by: rawCoder | last post by:
I have read that Exception Handling is expensive performance wise ( other than Throw ) , but exactly how ? Please consider the following example ... ////////////////// Code Block 1...
2
by: Max | last post by:
Sometimes I get this error when testing web.mail: The server rejected one or more recipient addresses The server response was: 473 kjhg@Kjhg.com relaying prohibited. You should authenticate first...
12
by: scsharma | last post by:
Hi, I am working on creating a webapplication and my design calls for creating main webform which will have menu bar on left hand side and a IFrame which will contain all the forms that are shown...
7
by: Jay | last post by:
Hi, I'm developing an windows application in VB.net. The people who will use this app all speak Dutch. Whenever an exception occurs I want to show a user friendly message to the user while...
24
by: Rob R. Ainscough | last post by:
VS 2005 I have: ClickOnce deployment User's that hate and or don't want to use an IE Client (don't blame them) I don't see how ASPX web pages are going to survive? With .NET 2.0 and clickonce...
33
by: Anthony England | last post by:
I am considering general error handling routines and have written a sample function to look up an ID in a table. The function returns True if it can find the ID and create a recordset based on...
2
by: Showjumper | last post by:
A question regarding forgotten passwords - As i understand it, it is best and most secure to use a 1 way hash+salt to store passwwords, and then if the user has forgotten the password, generate a...
4
by: John Wright | last post by:
I need some good ideas or references for robust error handling in VB.NET. I am using try catch but find myself using the generic exception handler. I would like to get more precise error handling...
4
by: robin9876 | last post by:
Instead of .Net showing an Object reference not set to an instance of an object error message. Is their a method of handling these messages and displaying a more user friendly message and recording...
9
by: Josh | last post by:
I run a Joomla website and am familiar with php in some but not all aspects. Currently I am trying to find some solutions related to session handling. Am I correct in saying that "login" is kept...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.