0
運行我有一些執行一段代碼就像一個功能,捕獲異常在不同的線程/回調
Protected void XXXXfunc()
{
//i register a callback for asynchronous operation below is just an example
// not true to its operation
byte[] buffer = new byte[10];
s.BeginReceive(buffer, 0, 10, SocketFlags.None,
new AsyncCallback(OnMessageReceived), buffer);
}
// Callback function
XXXX callback OnMessageReceived(XXXX)
{
//Something Goes wrong here i throw an exception
throw(exception);
}
在哪裏?我如何捕獲這個異常或者是被人抓住這個異常漏斗。