exception

Can't create a Many-To-One relation with all-delete-orphan cascade. MySQL says a foreign key constraint fails when deleting the parent.

Hi, I started using Hibernate recently and I'm still a newbie, however, the error I'm facing doesn't seem to be simple. My current environment is: Windows 7 MySQL 5.1.49-community mysql-connector-java-5.1.13-bin.jar hibernate-distribution-3.6.0.Beta1 I'm following the "Hibernate in Action" book and did everything exactly the way...

.Net Exception detail

Hi; How can one get detailed Exception thrown by the .net framework. The below log fragment shows something is wrong but what? A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll Unfortunately I can not catch this exception so I can not debug. Is there a way to get a detailed information about s...

In a Java debugger, how to ignore exceptions never passing through my code

I'm currently using IntelliJ IDEA for Java development, but I'm also interested in answers targeting other IDEs or general concepts for debugging Java code. Because this is a feature I've missed in a number of IDEs, I'm unsure if I've missed a workflow concept when transferring my debug habits from other languages. Let's say I'm writing...

Why might ProcessMessages throw a C++ Exception?

While maintaining an old product, I came across an error that results in the screen being filled up with hundreds of message boxes saying 'C++ Exception' and nothing else. I traced the problem to the following line: Application->ProcessMessages(); I understand the purpose of this line, to process all the messages in the message queue...

Why is raising an NSException not bringing down my application?

The Problem I'm writing a Cocoa application and I want to raise exceptions that will crash the application noisily. I have the following lines in my application delegate: [NSException raise:NSInternalInconsistencyException format:@"This should crash the application."]; abort(); The problem is, they don't bring down the application -...

Rules Violations Exceptions in LINQ ASP.NET MVC

Possible Duplicate: First attempt at Linq to Sql in NerdDinner - Rule violations prevent saving Hello, I am using ASP.NET MVC application with LINQ and when I try to SubmitChanges after Inserting a table data I am Getting "Rule violations prevent saving". I am doing UpdateModel before submitting but that passes fine. I doub...

Randomly Thrown IO Exceptions in C#

Hey, I have been working on a program to archive old client data for the company I work for. The program copies the data from the work server to the local machine, creates a .zip file of all the data, then copies it to the archive server. After it does all that, it deletes the original files and the local copies. Every now and then, th...

Unusual OleDbException: ?~¿????x(?(?? when connecting to Oracle 10g database, what would be the cause?

I'm working with a legacy application that uses OleDB to connect to an Oracle10g database. One customer is getting these exceptions being reported quite often: System.Data.OleDb.OleDbException: ?~¿????x(?(?? at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data...

Are exceptions thrown reliably when using Ado.Net stored procedures?

If I try and call a stored procedure and there is a database error, will that raise as an exception in my C# code? Or do I need to check the result of the stored procedure and raise an exception myself? Eg: using (SqlCommand cmd = new SqlCommand("prc_InsertSomething", conn)) { if (cmd.ExecuteNonQuery() != 1) // should I be doing th...

Finding the c# exception handler

I'm writing some fairly complex C# code. I'm finding that my code is throwing an exception (noted in the Output window) but the debugger isn't breaking in. I do have Exceptions sets to break on user-unhandled CLR exceptions. Since the debugger isn't breaking in, I assume that there must be a try{} somewhere in the call stack. Problem i...

Is Java's EOFException exceptional?

It seems dirty to use an exception to indicate the end of a file has been reached. Every file we read has an end, so it doesn't seem exceptional or unexpected. Furthermore, I don't like using an exception for the non-exceptional flow of my program. I'm talking about using java.io.EOFException to signal the end of a data input stream: I...

When Does Visual Studio 6 Catch Structured Exceptions?

This is mostly curiosity, but I've been reading about the history of Visual Studio catching SEH exceptions in a C++ try-catch construct. I keep running across the assertion that older version Visual Studio with the /GX flag enabled would "somtimes" catch structured Win32 exceptions in a C++ catch block. Under what circumstances will Vi...

Error handling with SqlBulkCopy - could it be any harder?

Running very low on ideas here. I've got a case where I'm using SqlBulkCopy to pump data into a DB, and about halfway through I run into different exceptions (primary key violations, index violations, etc). I've confirmed that the violations are in fact true and need to be corrected in the data. What's infuriating, though, is that if I ...

VB.NET, Castle ActiveRecord and MySQL: Duplicate entry in a unique field

Hi. When user inserts a duplicate entry in a unique field, Castle ActiveRecord throws the following exception: Castle.ActiveRecord.Framework.ActiveRecordException was unhandled Message="Could not perform Save for SerieNotaFiscal" Source="Castle.ActiveRecord" StackTrace: at Castle.ActiveRecord.ActiveRecordBase.InternalSave(O...

Are exception hierarchies really useful?

Hey guys, It dawned on me that I've never seen a single exception hierarchy for which creating subclasses but catching the parent class was actually useful (except, of course, for the base Exception class, that has to be derived). Are exception hierarchies really useful, xor should all exceptions be derived from language's base excepti...

How to deal with failed constructor when throwing exceptions is not allowed

I was looking at the Google C++ Style Guide and they have decided not to use exceptions in C++ code, relying on return values instead. My question is: How do you handle failure in constructors in this case, since you cannot return a value in those. Thanks! ...

C#: Throwing exceptions in switch statements when no specified case can be handled

I've been writing C# for the last 8 years and have become quite the defensive OOP programmer. Working in a statically-typed language, you do things like validate arguments in methods and throw exceptions where you wouldn't in languages that are dynamic and more liberal. I consider myself an expert in C# and am looking for feedback from o...

Why does the org.hibernate.JDBCException not print the sql statement in a stacktrace

When an org.hibernate.JDBCException occurrs (or a Subtype of this Exception) the sql statement is not visible in the Stacktrace. For Example if i execute the following SQL statement with hibernate (on an Oracle DB which does not have a table or view 'nonexsiting'): session.createSQLQuery("select * from nonexisting").list(); i get th...

Android 2.1 & HTC Desire: Is there a bluetooth problem? (CorruptedStreamException)

I made an application that is using Android SDK 2.1. This application uses bluetooth to connect to multiple devices. I have 3 HTC Dreams (Google G1) as test devices. The application is running really fine on them. They are rooted and Android 2.1 is running on them. If I join with my HTC Desire (Android 2.1 Update 1), the streams that r...

Does anyone use a style guide for error messages?

I've noticed that error messages tend to be written in a handful of common styles. Either in full-form, casual-friendly sentences, or in shortened passive ones that don't always form a full sentence. The latter of the two seems to be the more common - though maybe not as common as the haphazard mixing of styles that I see in a lot of app...