exception

.NET LINQ foreach DATETIME cannot convert String to DateTime exception

I have SQL data table that containes a DATE or DATETIME field a LINQ statement show here just to get the basic idea var testLinq = from t in DBDataContext.Certificates select t; foreach (var t in testLinq) { .... } Left out the code in {..} for briefness. BUT whenever 'foreach' tries to use t I get this exception ...

Format exception messages using InvariantCulture or CurrentCulture?

When throwing exceptions, I often pass in a formatted string that exposes details about the problem that has occurred. I always specify a formatting provider if possible (which is good practice because otherwise you may forget to decide which culture is appropriate and as the default is the current culture, that can lead to many bugs). ...

Automatically catch all exceptions thrown by BlazeDS remoting methods?

Is there a way to automatically catch all (unchecked) exceptions thrown by BlazeDS remoting methods, without wrapping each one in a last-resort try/catch block? My code catches any checked exceptions as required, but I'd prefer that stray NullPointerExceptions, ArrayIndexOutOfBoundsExceptions and the like don't end up being set to the cl...

Cocoa Distributed Object exception when manually creating remote NSSocketPort

Hi, This is really doing my head in, I hope someone can solve my issue. I'm trying to learn distributed object, bonjour, etc with Cocoa. I can get things up and running but there's just one case that's annoying me, i don't understand why it's happening. I'm trying to setup a DO server that advertise itself with Bonjour. Here's the...

How Exceptions are handled while designing DataLayer or any other layered architecture.

I am creating a data access layer where I want to handle exceptions that should be catched by Business layer with clear idea of the source of exception. I am doing something like this.. EDIT private void OpenConnection() { if (ConnectionState.Closed == _connection.State) _connection.Open...

lstrcpy() causing exceptions in visual C++ code

Hi, I used a MFC virtual list control to enhance the performance and I handle GetDispInfo(NMHDR* pNMHDR, LRESULT* pResult) to populate the ListCtrl. The relevant code in that method is as follows: if (pItem->mask && LVIF_TEXT) { switch(pItem->iSubItem) { case 0: lstrcpy(pItem->pszText, rLabel.m_strText); ...

How to 301 root site to new folder but allow new website on root

Ok let me see if I can explain this easily I have a forum that was hosted as my home page on www.mysite.com respectively. It's well indexed and I'd hate to lose any ranking. Today I moved the entire root site from the root domain to www.mysite.com/forum to make way for our new CMS system which will now be the home page. (This is to he...

Throws or try-catch

What is the general rule of thumb when deciding whether to add a throws clause to a method or using a try-catch? From what I've read myself, the throws should be used when the caller has broken their end of the contract (passed object) and the try-catch should be used when an exception takes place during an operation that is being carri...

Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))

Hi all , I'm trying to parse HTML page usging Microsoft.mshtml . I get an exception : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Any idea how to resolve this problem . Thanks in advance ... ...

Netbeans 6.1 Debugger stopped working with error com.sun.jdi.InternalException: Unexpected JDWP Error: 502

I have been using Netbeans 6.1 for a long time and my debugger has always been flawless. Somehow recently (within the last two weeks or so) my debugger stops at breakpoints but it either freezes most of the time or i can't find out the value of any variable, my local variables wont expand and my watches will sometimes show all nulls eve...

Administrative Limit Exceeded During C# LDAP Search

I am trying to do a LDAP Search however I keep getting the following error: Unhandled Exception: System.Runtime.InteropServices.COMException (0x80072024): T he administrative limit for this request was exceeded. at System.DirectoryServices.SearchResultCollection.ResultsEnumerator.MoveNext () at System.DirectoryServices.DirectoryS...

CommandConverter - Valid exception or .NET Bug

I'm getting an exception in my C#/.NET application that reads: 'CommandCoverter' is unable to convert 'MyNamespace.MyDerivedFromICommandSubclass' to 'System.String'. What I'm doing is fairly straight forward, as described by the MSDN ICommand documentation: public class MyDerivedFromICommandSubclass : ICommand { // Implement int...

how to add one exception handler for a class?

Hi, I am trying to use one exception handler to handle all exceptions raised by a C++ class. is there a simple way, instead of adding the code to every member function? Thanks ...

Why the form load can't catch exception?

Is this a bug in Winforms? (tested on both VS2008 and VS2010) private void Form1_Load(object sender, EventArgs e) { throw new Exception("Hey"); } I don't receive any error in that code, awhile ago, I'm trying to formulate a solution for this question http://stackoverflow.com/questions/3204673/parse-number-from-string-v...

What happens when BEFORE INSERT TRIGGER fails in oracle

Hi, I have a small doubt regarding BEFORE INSERT TRIGGER in oracle, my trigger looks like this: CREATE OR REPLACE TRIGGER some_trigger BEFORE INSERT ON some_table REFERENCING NEW AS newRow FOR EACH ROW DECLARE some_var number(25, 4); BEGIN -- do some stuff :newRow.some_column :=some_var; exception when no_data...

Is AotoMapper Supported Complex Class Structure?

I have a problem when I try to map following class. class LazyStudent : ActiveRecordBase { [Property] public String Name { set; get; } [HasMany(typeof(LazyStudentBook))] public IList<LazyStudentBook> Books { set; get; } } class LazyStudentBook : ActiveRecordBase { [...

Ruby Enumerator - Why Finish with Exception?

Iterating a block in Ruby is simple enough - it finishes cleanly and proceeds on to the rest of the code. Iterating with an Enumerator, on the other hand, is a bit more confusing. If you call :each without a block, an Enumerator is returned instead. :next can then be called on the Enumerator to get each next iterative value. And then...

When to use exceptions in Java (example)

I know that this would be bad practice although I know that I would not be able to explain why. int [] intArr = ... ... try{ int i = 0; while(true){ System.out.println(intArr[i++]); } }catch(ArrayIndexOutOfBoundsException e){} I think that you are only supposed to use exceptions for things that shouldn't happen. I am...

Response.Redirect() ThreadAbortException Bubbling Too High Intermittently

I understand (now) that Response.Redirect() and Response.End() throw a ThreadAbortException as an expensive way of killing the current processing thread to emulate the behaviour of ASP Classic's Response.End() and Response.Redirect methods. However. It seems intermittently in our application that the exception bubbles too high. For exa...

Why doesn't VB.NET enforce handling exceptions?

Possible Duplicate: Why are Exceptions not Checked in .NET? If I remember correctly, Java enforces catching and handling any exceptions a called method may throw. Why doesn't .NET do the same? ...