Hello,
I have developed a small WCF service which handles HTTP request.
I want to be aware of every fault that happens:
everything that causes 500 Internal Server Error from the contracts view
everything that causes a CommunicationException from the bindings view (I've written a custom one but am using standard ones also)
The err...
Which is more efficient in Java: to check for bad values to prevent exceptions or let the exceptions happen and catch them?
Here are two blocks of sample code to illustrate this difference:
void doSomething(type value1) {
ResultType result = genericError;
if (value1 == badvalue || value1 == badvalue2 || ...) {
resul...
I have written a custom WCF binding which replies to requests over HTTP from a different source.
In the Channel's ReceiveRequest method, it's possible to receive a bad request from a client (for example, if he does not send HTTP etc..) However, due to the non-existance of a RequestContext at this time point (ReceiveRequest should return...
I'm developing a new Java desktop application and would like to include a crash reporting facility - you know the kind of thing - program crashes, box pops up asking user to click okay to send it, etc.
I'm comfortable with how the error will be sent back to our servers - probably via a simple web service. What I'm more unsure about is ...
Hello,
I've wrote some program in Delphi and when I am running it from a disk on key. At some point I'm required to unplug the disk on key while the application is running. If I do this on a computer with at least 1gb of ram everything is okay. When I do this on a machine with 512mb I get an external exception C0000006. If I'm not mista...
I am developing an application on the Google App Engine using Python.
I have a handler that can return a variety of outputs (html and json at the moment), I am testing for obvious errors in the system based on invalid parameters sent to the request handler.
However what I am doing feels dirty (see below):
class FeedHandler(webapp.Requ...
I have a problem with my autoloader:
public function loadClass($className) {
$file = str_replace(array('_', '\\'), '/', $className) . '.php';
include_once $file;
}
As you can see, it's quite simple. I just deduce the filename of the class and try to include it. I have a problem though; I get an exception when trying to load a ...
I have a very unique situation.
We use a Cisco Web VPN (don't know the exact name) here at work.
If I try to use the web pages I've developed, the javascript is broken.
I have tracked it down to this:
When using the Cisco Web VPN it will actually rewrite some of the HTML/JavaScript code.
For instance, at the very beginning of the s...
If I have a main procedure with error handling that calls other procedures without error handling, should errors roll up to the main procedure?
What if the procedures without error handling use functions without error handling?
Should everything roll up to the main procedure's error handling?
I apologize ahead of time if this is a s...
Hey,
I have this a field:
<h:inputText id="email" value="#{user.user.email}" title="Email" validator="#{user.user.validateEmail}"/>
The validateEmail method checks if the email address's length is greater than 0, if not, it throws an exception. I thought this would work, but sadly the method is called only if you enter a value. Why?
...
Hi, i have the next code:
NSURL *url = [NSURL URLWithString:@"http:...."];
NSMutableURLRequest *theRequest = [NSMutableURLRequest requestWithURL:url];
NSString *msgLength = [NSString stringWithFormat:@"%d", [""soapMessage"" length]];
[theRequest addValue: @"text/xml; charset=utf-8" forHTTPHeaderField:@"Content-Type"];
[theRequest addVa...
I have a legacy VB6 application that needs to make asynchronous calls to a web service. The web service provides a search method allows end-users to query a central database and view the results from within the application. I'm using the MSXML2.XMLHTTP to make the requests, and have written a SearchWebService class that encapsulates the ...
Let's say you have a business logic method that can perform some operation across a number of objects. Maybe you want to call a lottery number picking web service, once for each person selected from a list. In Java, the code might look something like this:
Set<Person> selectedPeople = ... // fetch list of people
for ( Person person : se...
My background is in C# and I've just recently started programming in Python. When an exception is thrown I typically want to wrap it in another exception that adds more information, while still showing the full stack trace. It's quite easy in C#, but how do I do it in Python?
Eg. in C# I would do something like this:
try
{
ProcessFil...
Hi,
I know one can add event listener for window.error.
However when working with Iframes, each Iframe has its own window element, and window.error should be created for each and every Iframe.
Is it possible somehow to define error event handler in one location ,where all errors will
trigger this specific method?
Thanks,
Tal.
...
Let's say I put the following code somewhere in a Master page in my ASP.NET MVC site:
throw new ApplicationException("TEST");
Even with a [HandleError] attribute placed on my controller, this exception still bubbles up. How can I deal with errors like this? I would like to be able to route to an Error page and still be able to log t...
This is just a general design question. If you are developing a business component or service, (e.g. an object/service that exposes a relatively simple interface for handling billing transactions), what are some good ways to handle business-related errors?
Say the component/service must integrate with a few different external web servi...
How should I prepare the code if it something fails? With try-catch statement or?
function delete_question ( $question_id ) {
$dbconn = pg_connect("host=localhost port=5432 dbname=heoa user=heoa password=123");
// removes questions and its dependencies: answers and tags
$result = pg_query_params ( $dbconn,
'DELETE F...
Hi, I'm using an error handler on my main calling procedure and letting the other procedures just roll up to that error handler.
Should I be clearing the error each time? Or should I Exit Sub instead of letting the error handler continue on the End Sub?
I'm asking because I've read that I may catch the first error, and then the other ...
Why would I want to get out of an Error Handler (after handling) with an Exit Sub instead of just letting it go to the End Sub?
I'm sure it's simple. I just don't understand. Thanks for any help.
Example:
Public Sub SubA()
On Error Goto ProcError
''# other code
MsgBox FuncA()
ProcExit:
Exit Sub
ProcError:
MsgBox Err...