hi, I'm getting this error when the program executes mainDb.SubmitChanges():
INSERT INTO projects
VALUES (@p0)
SELECT CONVERT(Int, SCOPE_IDENTITY()) AS [value]
-- @p0: Input String (Size = 0; Prec = 0; Scale = 0) [test2]
-- Context: SqlProvider(Sql2008) Model: AttributeMetaModel Build: 3.5.30729.4926
my code has the following files:
P...
Possible Duplicate:
Return 'null' or throw exception
Say I have a method
public Person LoadPersonFromDatastore(int personId)
{
...
}
What should I do if the person was not found? Is it best to return null or should I throw an Exception? My opinion would be not to use an exception here since it adds no useful information i...
From Task Queue Python API Overview:
If your task's execution nears the 30
second limit, App Engine will raise an
exception which you may catch and then
quickly save your work or log process.
Which exception is that?
...
Is there an exception that I can use for when there are one or more files not found?
I'm doing this: filePaths.Where(file => !file.Exists); and I need to throw some kind of FilesNotFound exception. Do I need to inherit from Exception and make my own exception class?
I'm using C# .NET 4.
...
I've occasionally written Java code in the following manner:
public static TrustManager[] getTrustManagers(TruststoreParams tsParams)
throws IOException, GeneralSecurityException {
TrustManagerFactory tmf = null;
FileInputStream fis = null;
try {
...
return tmf.getTrustManagers();
}
catch (NoSuchAlgor...
Hi dear community, I'm developing Java MIDI application.
And I have stuck with debugging of exception, which dispatching at the end of song. As I'm expecting: the application is playing and each time I'm checking the sequence tick position to represent it in application playback line, like as player.
So I want to know how could I get t...
Hi,
This one is pretty weird ... I have a VSTO Excel 2007 project for C# where I create a bunch of worksheet functions that return object[,]. They all work fine but I wanted to return exception messages/stack traces when the function fails. When I tried this I got #VALUE!'s everywhere. So during troubleshooting the issue I created a s...
I've read about when to use assert vs. exceptions, but I'm still not "getting it". It seems like whenever I think I'm in a situation where I should use assert, later on in development I find that I'm "looking before I leap" to make sure the assert doesn't fail when I call the function. Since there's another Python idiom about preferrin...
Hi!
I have a @Stateless EJB with a @WebService interface, using container managed transactions, meaning transactions are automatically committed by the container after a method has been called if it doesn't throw a system exception.
If i try to EntityManager.persist(...) two objects with the same value for a column with a unique const...
Hi,
I am new at android developing.
The project is about implementing an AbstractAccountAuthenticator with an AbstractThreadedSyncAdapter to sync certain data on a server with a content provider.
I made everything and both adding accounts and syncing is running without any problems.
Now I've tried to add a Preference-Screen just like...
For the last hour and a half I've trace Javascript calls in a Magento shop I'm building, because I have the strange effect that, when checking out, I can not leave page 2 (shipping address) of the onepage checkout, unless I switch from "send to this address" to "send to another address".
I've traced it down to this piece of javascript...
Hi,
I'm wondering which is the better way to catch exceptions that I throw: is it a __try / __except block or a try / catch block?
I'm writing in C++ and the program will only be used on Windows, so portability is not an issue.
Thanks!
...
When should I create my own custom exception class rather than using a one provided by .Net?
Which base exception class should I derive from and why?
...
EDIT
After looking at this for a while, I thought it might be a configuration issue on my development box. However, after doing a clean download of the source code to a different development machine, I'm still getting this issue.
I've got a Silverlight client that calls WCF services asynchronously. Intermittently, I will get one ...
what does it mean when one says allow exception to propagate upwards to the client ??
How does it work?
...
I've developed a .NET 4 software and I'm ready to send it to beta users. If an unhandled exception is thrown in the software, I would like to catch it, log it and send the logs to me. I've already implemented this functionality and it seems to be running fine when I run it in debug mode with Visual Studio. However, when I've built a rele...
Hello All,
I have been using a driver to test one of my data structures(Binary Search Tree)
and i have come across this issue.
-It happens when i insert more than 2 objects into the bst
-What I am trying to do: I am inserting 4 objects into the tree, then i am deleting 2 objects, and then printing out my find method so that it displays ...
In Javascript, suppose I want to perform some cleanup when an exception happens, but let the exception continue to propagate up the stack, eg:
try {
enterAwesomeMode();
doRiskyStuff(); // might throw an exception
} catch (e) {
leaveAwesomeMode();
throw e;
}
doMoreStuff();
leaveAwesomeMode();
The problem with this code is that ...
My scenario:
When i ping with www.google.com it give the status Success, When i try to ping http://stackoverflow.com i got an exception "An exception occurred during a Ping request." What is the reason? how can i solve?
using (Ping png = new Ping())
{
PingReply pr = png.Send("http://stackoverflow.com");
string status= pr.Status.To...
As i'm new to android, i really couldn't understand the errors or execptions shown in the android DDMS,I'm using Eclipse ..
Can anyone please share some very frequent exceptions that appear in DDMS and how to handle them......
...