Click here to Skip to main content
15,900,511 members
Home / Discussions / C#
   

C#

 
AnswerRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 14:30
Jeffrey Walton22-Nov-07 14:30 
GeneralRe: Catching an Exception [modified] Pin
Luc Pattyn22-Nov-07 15:13
sitebuilderLuc Pattyn22-Nov-07 15:13 
GeneralRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 15:46
Jeffrey Walton22-Nov-07 15:46 
GeneralRe: Catching an Exception Pin
Luc Pattyn22-Nov-07 22:42
sitebuilderLuc Pattyn22-Nov-07 22:42 
AnswerRe: Catching an Exception Pin
Luc Pattyn22-Nov-07 14:52
sitebuilderLuc Pattyn22-Nov-07 14:52 
GeneralRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 15:12
Jeffrey Walton22-Nov-07 15:12 
AnswerRe: Catching an Exception Pin
Michael Sync22-Nov-07 15:19
Michael Sync22-Nov-07 15:19 
GeneralRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 16:01
Jeffrey Walton22-Nov-07 16:01 
Hi Michael,

Michael Sync wrote:

int Eaten = 0;
try
{
  throw new EncodingException("this is encoding exception");
}
  catch (EncodingException ex)
  ...
}
Are you staing that the exception can only be caught in the function that generates it? I have read explicitly otherwise. The CLR is suppose to walk the stack looking for a handler. According to Richter:
Another advantage of exceptions is that they do not have to be caught or detected in the place they occur; any code in the thread's call stack can handle a thrown exception.


Jeff
[1] CLR via C#, p. 421, ISBN 9-7807-3562-1633.
GeneralRe: Catching an Exception Pin
Michael Sync22-Nov-07 16:19
Michael Sync22-Nov-07 16:19 
AnswerRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 16:05
Jeffrey Walton22-Nov-07 16:05 
GeneralRe: Catching an Exception Pin
Michael Sync22-Nov-07 16:28
Michael Sync22-Nov-07 16:28 
GeneralRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 16:55
Jeffrey Walton22-Nov-07 16:55 
GeneralRe: Catching an Exception Pin
Michael Sync22-Nov-07 19:10
Michael Sync22-Nov-07 19:10 
GeneralRe: Catching an Exception Pin
Jeffrey Walton22-Nov-07 21:33
Jeffrey Walton22-Nov-07 21:33 
GeneralRe: Catching an Exception Pin
Michael Sync22-Nov-07 22:10
Michael Sync22-Nov-07 22:10 
AnswerRe: Catching an Exception Pin
Jeffrey Walton24-Nov-07 13:09
Jeffrey Walton24-Nov-07 13:09 
GeneralRe: Catching an Exception Pin
Luc Pattyn23-Nov-07 2:27
sitebuilderLuc Pattyn23-Nov-07 2:27 
AnswerRe: Catching an Exception Pin
Michael Sync22-Nov-07 16:23
Michael Sync22-Nov-07 16:23 
Questiontreeview upload Pin
angels77722-Nov-07 13:47
angels77722-Nov-07 13:47 
AnswerRe: treeview upload Pin
Jeffrey Walton22-Nov-07 16:03
Jeffrey Walton22-Nov-07 16:03 
GeneralRe: treeview upload Pin
angels77722-Nov-07 18:01
angels77722-Nov-07 18:01 
QuestionSending one array's members to another array by condition? Pin
omegazafer22-Nov-07 11:48
omegazafer22-Nov-07 11:48 
AnswerRe: Sending one array's members to another array by condition? Pin
Mustafa Ismail Mustafa22-Nov-07 11:58
Mustafa Ismail Mustafa22-Nov-07 11:58 
GeneralRe: Sending one array's members to another array by condition? Pin
omegazafer22-Nov-07 12:02
omegazafer22-Nov-07 12:02 
GeneralRe: Sending one array's members to another array by condition? Pin
Mustafa Ismail Mustafa22-Nov-07 12:38
Mustafa Ismail Mustafa22-Nov-07 12:38 

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.