Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: how can i connect to microsoft access database Pin
Hexa How2-Apr-14 20:41
Hexa How2-Apr-14 20:41 
QuestionMultiple try blocks in c# 2.0 Pin
ramki481-Apr-14 2:35
ramki481-Apr-14 2:35 
AnswerRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 3:04
professionalEddy Vluggen1-Apr-14 3:04 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 4:47
mveOriginalGriff1-Apr-14 4:47 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Rob Philpott1-Apr-14 5:18
Rob Philpott1-Apr-14 5:18 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 5:38
mveOriginalGriff1-Apr-14 5:38 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Rob Philpott1-Apr-14 5:46
Rob Philpott1-Apr-14 5:46 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 6:44
professionalEddy Vluggen1-Apr-14 6:44 
Rob Philpott wrote:
So much code I see catches an exception, logs it, then just carries on.
Unless one can handle it, logging is all you can do. The idea would be that you look at the log (when dogfooding the app), and use it to stop logging the exceptions you DO expect, handle those you can, or provide a neat message to the user. You'll find that the amount of "unexpected" exceptions decline over time.

Rob Philpott wrote:
I'm subscribing more and more to the idea (in general) that if something exceptional has happened, the application is now in an unstable state and should be shut down until investigation has found out what went wrong.
Halleluja! You're 100% right; tryordie is the way to go. If you don't, you'll encounter an equivalent of backing up data, swallowing the exception that your backup failed and continue to wreck the only valid datastore.

Rob Philpott wrote:
Why is there no TryConnect??
Write one.

If you expect the exception, you can handle it.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: Multiple try blocks in c# 2.0 Pin
Rob Philpott1-Apr-14 6:51
Rob Philpott1-Apr-14 6:51 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 9:11
professionalEddy Vluggen1-Apr-14 9:11 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Eddy Vluggen1-Apr-14 6:56
professionalEddy Vluggen1-Apr-14 6:56 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 7:56
mveOriginalGriff1-Apr-14 7:56 
GeneralRe: Multiple try blocks in c# 2.0 Pin
BobJanova1-Apr-14 23:29
BobJanova1-Apr-14 23:29 
AnswerRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 5:15
Deflinek1-Apr-14 5:15 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 8:25
mveOriginalGriff1-Apr-14 8:25 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 23:51
Deflinek1-Apr-14 23:51 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff2-Apr-14 0:04
mveOriginalGriff2-Apr-14 0:04 
AnswerRe: Multiple try blocks in c# 2.0 Pin
GuyThiebaut2-Apr-14 2:20
professionalGuyThiebaut2-Apr-14 2:20 
QuestionHow to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 0:30
taibc1-Apr-14 0:30 
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 1:18
Simon_Whale1-Apr-14 1:18 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Wayne Gaylard1-Apr-14 1:21
professionalWayne Gaylard1-Apr-14 1:21 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 22:40
Simon_Whale1-Apr-14 22:40 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc2-Apr-14 17:59
taibc2-Apr-14 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.