We are using the approach described here to log our webservice errors with Elmah. And this actually works, but sadly the username beeing logged is empty.
We did some debugging and found, that when logging the error in the ErrorHandler the HttpContext.Current.User has the correct User set.
We also tried:
HttpContext context = HttpCont...
Hi friends
how to compare an adjacent array element that contains date. The thing is when
i compare
BOOL day = [[temp_date objectAtIndex:k] compare:[temp_date objectAtIndex:k+1]];
it throughs the following expection
* Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSCFArray objectAtIndex:]: index (23) be...
I can't get Fiddler to install properly or open once it's installed (I have to press "ignore").
It just gives me the message "The application has generated an exception that could not be handled" And a bunch of numbers. I'm not posting them here because they're never the same numbers either. I don't know what to do, I updated Net Framewo...
I'm trying to write to a JDO store using this code:
PersistenceManager pm = PMF.get().getPersistenceManager();
try {
pm.currentTransaction().begin();
// deactivate all for current domain
Query q = pm.newQuery(CampaignStore.class, "domain == '" + domain +"'");
Collection result = (Collection) q.e...
I have a method doSomething() that has one try catch block, within which I call another method.
public void doSomething()
{
try
{
doSomethingElse()
}
catch
{
}
}
In that other method doSomethingElse() I dont have any try catch block. I am depending on the ma...
Hello..
I'm developing a swing application and I'm a bit confused how can I handle exceptions for example lately a part of my code rename files, So when I was testing it I came up with a "you don't have permission to rename file" as I got it from print exception message. So How Could I express this message to user? and should I use JOpt...
I'm using ELMAH to log errors. I'm extending HandleError attribute with my own that allows ELMAH to handle all errors. It's my understanding that ELMAH will return Error.aspx to the browser after the error has been logged. That's well and good except for Ajax calls. My client is expecting an Exception returned as JSON if something ha...
Is there a way prevent tarfile.extractall (API) from overwriting existing files? By "prevent" I mean ideally raising an exception when an overwrite is about to happen. The current behavior is to silently overwrite the files.
...
Hi,
I'm trying to save a sound as a ringtone in Android using this code. It works like a charm but will fail if I try to save a ringtone that has already been inserted.
A "SQLiteConstraintException" occurs while saving but I'm not able to catch the exception, in fact, I can't catch any execption.
Here's the part of my code:
Uri uri =...
Hello there, I got a generic repository - should the repository be able to throw exceptions or should I keep it dumb? If I chose to throw exceptions from it, should the service layer then catch it and throw an exception with a more friendly message before it goes to the Controller?
Pos1: Repository (Throw) => Service(Catch, Throw new) ...
Hey,
I have a server which is throwing WebFaultException
try
{
...
}
catch (InvalidPasswordException)
{
throw new WebFaultException<String>
("This is a bad password",
HttpStatusCo...
I have a WCF-service running inside a windows service. There is an mex-endpoint at http://localhost/...
I can navigate to it via a browser but if I use MetadataResolver.Resolve, the above mentioned exception will be thrown (with inner exception of "The remote server returned an error: (404) Not Found.").
The only difference I spotted i...
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the String:");
String str = br.readLine();//error: must be caught or declared
String reverseStr="";
for(int i=str.length()-1;i>=0;--i)
reverseStr += str.charAt(i);
System.out.println(reverseStr);
Should i include try catch bloc...
I'm currently developing a solution and have designed it in a way such that it strongly implements the strategy/provider pattern. As such the solution exposes a number of interfaces and contains default implementations of these interfaces which can be replaced via a DI type methodology.
Where the host application uses a number of these...
Hi
When I run the client Hnadshake process on my java application in order to establish SSL connection, I get SSLException on the secod time that I call to the wrap method. I understand that in this point the client send the CLientKeyExchangeand ChangeCipherSpec to the server. The error message that I get from the exception is "General ...
I have a custom portlet made for liferay and sometimes it throws an exception. Why it throws exceptions is irrelevant.
How to catch exceptions thrown by portlet handler methods in order to email information about them? I know I could do try catching on every handler method but it would be a much more elegant and cleaner solution to catc...
http://www.devx.com/tips/Tip/5573
The above post states that there will not be memory leak during object construction.
How about the code below? Will this cause any memory leaks? I see that the memory usage for the sample application increases slowly (in task manager) even after forcing the GC collection.
namespace WindowsFormsApplica...
I have an application based on Zend Framwork. In one Model I am calling a method from another Model. When I call this method I use try-cath block for handling of strange situations.
Model1.
try {
$result = Module_Model2_Name->method();
} catch (Exception $e) {
// Do Something
}
Catch should be work if we find a throw in try bl...
We are getting a really rare error during HTTP requests:
System.Net.InternalException: System error.
at System.Net.HttpWebRequest.SetAndOrProcessResponse(Object responseOrException)
at System.Net.ConnectionReturnResult.SetResponses(ConnectionReturnResult returnResult)
at System.Net.Connection.ReadComplete(Int32 bytesRead, WebExceptionSt...
Could some body explain exception vs error in asp.net
...