Hi,
I'm developing a silverlight application that consumes a webservice. Calls to this webservice are made Asynchronously. But when an exception occurs during a procedure of the async call, I get an error on the completed event but i lost my original exceptions information. Independent of what the original exception was, I always get "...
Hi,
I have a .NET program with an event handler bound to Application.CurrentDomain.UnhandledException.
When running the program with debugging, this event fires when an unhandled exception is thrown. However, when running without debugging, the event does not fire.
What is my problem?
Thanks,
Andrew
...
2009-08-19 11:00:06.482 Pickers[26090:20b] *** Assertion failure in -[UIDatePickerView _updateBitsForDate:andReload:animateIfNeeded:], /SourceCache/UIKit/UIKit-963.10/UIDatePicker.m:908
2009-08-19 11:00:06.483 Pickers[26090:20b] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter n...
Is it legal and safe in C# to catch an exception on one thread, and then re-throw it on another.
E.g. is this legal
Exception localEx = null;
Thread mythread = new Thread() { () =>
{
try
{
DoSomeStuff();
}
...
Hi All,
I need to change an existing service API to throw an extra exception for a scenario. The exception will be a subtype of an already thrown exception. Is it okay to do this or will it be considered backwards incompatible?
I have the interface in a separate jar, so if my service throws this new exception which is a child of the al...
I was just wondering if a system exception like say divide by zero actually "throws" something to the application. Would it be possible to catch this somehow by default?.
i mean we can define a custom divide fn which checks for null divisor and throws an exception, but just thought it would be nice if this exception was thrown by defaul...
Hi,
I was debating with some colleges about what happens when you throw an exception in a dynamically allocated class. I know that malloc gets called, and then the constructor of the class. The constructor never returns, so what happens to the malloc?
Consider the following
class B
{
public:
B()
{
cout << "B::B()" ...
Which is more efficient in Java: to check for bad values to prevent exceptions or let the exceptions happen and catch them?
Here are two blocks of sample code to illustrate this difference:
void doSomething(type value1) {
ResultType result = genericError;
if (value1 == badvalue || value1 == badvalue2 || ...) {
resul...
I first came across exceptions with ADA 83. As far as I know, the designers of ADA invented the concept of exceptions. Is this true, or did any programming language that came before use exceptions too?
...
Is there an elegant way to trap all unhandled exceptions in a Windows Form application? I would like to handle them and write them to a log file. I know ASP.NET has one. I'm using C#.
...
I'm trying to add a PropertyChangedCallback to UIElement.RenderTransformOriginProperty. An exception is thrown when I try to override the PropertyMetadata.
I have searched MSDN and Google, and all I have been able to come up with is this. DependencyPropertyDescriptor.AddValueChanged is suggested at some point in that post, but that wo...
Following code will compile but crash at run time:
int main() {
try {
throw;
}
catch(...){
cout<<"In catch";
}
return 0;
}
Result: “Unhandled exception at 0x7c812a5b in hello.exe: Microsoft C++ exception: [rethrow] @ 0x00000000”
Why compiler allows the code to compile? it looks not so difficult ...
According to the documentation for IDataRecord, the implementing methods must throw IndexOutOfRangeException if the field index is out of the range of fields. However, if you try to throw an IndexOutOfRangeException directly in code, FXCop complains that it is a reserved exception type. How do you keep to the IDataRecord exception contra...
I'm developing an application that dynamically loads a JAR, which contains the definition of a bunch of classes it uses. Everything went fine until I tried to catch an Exception-derived class that's in the dynamically loaded JAR.
The following snippet shows the issue (DynamicJarLoader is the class which actually loads the JAR; both Test...
When I write code in Python with exception handling I can write code like:
try:
some_code_that_can_cause_an_exception()
except:
some_code_to_handle_exceptions()
else:
code_that_needs_to_run_when_there_are_no_exceptions()
How does this differ from:
try:
some_code_that_can_cause_an_exception()
except:
some_code_to_h...
I've defined this subclass of CLLocation
MyLocation.h
@interface MyLocation: CLLocation {
NSString *datum;
NSString *ellipsoid;
}
@property(nonatomic,retain) NSString *ellipsoid;
@property(nonatomic,retain) NSString *datum;
MyLocation.m
@synthesize datum,ellipsoid;
Now i get a CLLocation instance through the location mana...
Hello,
I've wrote some program in Delphi and when I am running it from a disk on key. At some point I'm required to unplug the disk on key while the application is running. If I do this on a computer with at least 1gb of ram everything is okay. When I do this on a machine with 512mb I get an external exception C0000006. If I'm not mista...
I have the following class in C# which creates an object from a propriatery .DLL that requires a license in a reachable directory at the initialization .
public CplexServices{
private Cplex _cplex;
public Cplex Cplex { get { return _cplex; } }
public CplexServices()
{
try
{
_cplex = new Cplex(...
Good afternoon everybody!
I have this threaded SerialPort wrapper that reads in a line from the serial port. Here is my thread's code.
protected void ReadData()
{
SerialPort serialPort = null;
try
{
serialPort = SetupSerialPort(_serialPortSettings);
serialPort.Open();
string data;
whi...
Consider this code for loading, modifying and saving a Bitmap image:
using (Bitmap bmp = new Bitmap("C:\\test.jpg"))
{
bmp.RotateFlip(RotateFlipType.Rotate180FlipNone);
bmp.Save("C:\\test.jpg");
}
it runs without any exception.
But consider this one:
using (Bitmap bmp = new Bitmap("C:\\test.jpg"))
...