I have an RadUpload with nothing special configured in my Silverlight XAML.
<
telerik:RadUpload
...
FileUploadFailed
=
"RadUpload_OnFileUploadFailed"
/>
The Handler in the Code behind is also straight forward.
private
void
RadUpload_OnFileUploadFailed(
object
sender, FileUploadFailedEventArgs e) {
MessageBox.Show(e.ErrorMessage);
}
In the RadUploadHandler at server side I throw an exception.
public
class
MyUpload : RadUploadHandler {
public
override
string
GetTargetFolder() {
throw
new
Exception(
"UploadPath not configured."
);
}
}
But in RadUpload_OnFileUploadFailed I can't get the message. e.ErrorMessage is an empty string, no other property of e contains the message.
In the code of RadUploadHandler I can see that exceptions are caught and message is sent back to client like following in method ProcessRequest:
this.AddReturnParam("RadUAG_message", (object) ex.Message);
Also Fiddler shows that the message is sent to the client. Why it doesn't appear in the FileUploadFailedEventArgs?