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
...
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).
...
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...
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...
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...
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); ...
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...
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...
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 ...
...
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...
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...
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...
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
...
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...
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...
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
{
[...
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...
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...
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...
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?
...