Click here to Skip to main content
15,894,291 members
Home / Discussions / C#
   

C#

 
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 
Questionhow i can remove the current row..? the record is not yet saved on the database..the remove button is exist in every row of a repeater.. Pin
Member 1058077031-Mar-14 23:14
Member 1058077031-Mar-14 23:14 
QuestionC# new tab dynamic Pin
antrock10131-Mar-14 23:09
antrock10131-Mar-14 23:09 
AnswerRe: C# new tab dynamic Pin
Richard MacCutchan31-Mar-14 23:30
mveRichard MacCutchan31-Mar-14 23:30 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 0:02
antrock1011-Apr-14 0:02 
GeneralRe: C# new tab dynamic Pin
Richard MacCutchan1-Apr-14 0:28
mveRichard MacCutchan1-Apr-14 0:28 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 2:03
antrock1011-Apr-14 2:03 

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.