In Python is there any language (or interpreter) feature to force the python interpreter to always raise exceptions even if the exception offending code is inside a try/except block ?
I've just inherited a larger and old codebase written in python, whose purpose is to communicate with some custom designed hardware we also developed.
Ma...
I've developed a website testing on localhost Cassini and it has always run fine, now when I deploy to my webserver I intermittently get the following error:
Global.Application_Error Error: Exception occurred during request: http://....blah.aspx Unable to validate data. at System.Web.Configuration.MachineKeySection.GetDecodedData(Byt...
My web sevices support flex/flash clients and, upon unhandeld exceptions, throw custom faults that extend System.ServiceModel.FaultException.
I have been informed that flex/flash can't read these custom faults if the the http response code is different from 200. This is documented as flex/flash bug: http://bugs.adobe.com/jira/browse/SD...
In some Delphi 7 code I am maintaining, I've noticed a lot of instances of the following:
with ADOQuery1 do begin
// .. fill out sql.text, etc
try
execSQL;
except
raise;
end;
end;
It seems to me that these try blocks could be removed, since they do nothing. However, I am wary of possible subtle side-effects..
Can any...
Hi,
I have created a JSP which is supposed to fecth contact list from GMAIL,
i have added all the required jar file in class path,
Here is teh library which i am using
http://code.google.com/p/contactlistimporter/
Bellow is my code,
<%@ page import="com.xdatasystem.contactsimporter.*" %>
<%@ page import="com.xdatasystem.user.*" %>
...
We received some hard to reproduce error reports. The users gets the "An error occurred. The application will now exit." message box and then the app exits.
In Main() I write the exception to a log file:
System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+.
at System.Drawing.Image.FromHbitmap(IntPtr hbitma...
I have a WPF application with a form that, when started, invokes a custom method in a new thread.
Private Sub TestStep1_Loaded(ByVal sender As Object, ByVal e As System.Windows.RoutedEventArgs) Handles Me.Loaded
Dim oThread As New Thread(AddressOf DisplayNextPicture)
oThread.Start()
End Sub
Private Sub DisplayNextPicture()
...
My application generally running on 10-20 threads and these threads sending events to the GUI to the update certain controls almost every seconds.
When the user close the application middle of these, all updates related with these events causes several random crashes. Mostly ObjectDisposedException and NullReferenceException.
Since the...
Im having a debate with a co-worker about throwing exceptions from constructors, and thought I would like some feedback.
Is it ok to throw exceptions from constructors, form a design point of view?
Lets say I'm wrapping a posix mutex in a class, it would look something like this.
class Mutex {
public:
Mutex() {
if(pthread_mutex_...
Here's what I'm trying to do in my Global.asax.vb:
Public Class MvcApplication
Inherits System.Web.HttpApplication
Shared Sub RegisterRoutes(ByVal routes As RouteCollection)
routes.IgnoreRoute("{resource}.axd/{*pathInfo}")
routes.MapRoute( _
"Error", _
"error.html", _
New With...
How can I correctly handle exceptions thrown from controllers in ASP.NET MVC? The HandleError attribute seems to only process exceptions thrown by the MVC infrastructure and not exceptions thrown by my own code.
Using this web.config
<customErrors mode="On">
<error statusCode="401" redirect="/Errors/Http401" />
</customErrors>
...
I have a BO method that must do two operations to fulfill its contract.
insert a record into the db
send an email notification containing the metadata for the record
Both are handled with calls to individual DAO methods responsible for completing the action.
I do not trap exceptions in my DAO, I handle and publish them in the BO. T...
I have a rails application, running in development mode ( with a sqlite database ). The application's purpose is to allow users to upload files through a java client.
If a user wants to upload a folder, all the files inside it will be recursively uploaded. If a user wants to upload a file, the file will be uploaded normally.
Here's t...
I opened a project (created in D2007/08) in D2009 and it would compile but throw tons of exceptions when executed. Strange thing, but I know the project's a mess, so I want to go ahead and fix it. Well, not really fix all of it, just make it work would be enough.
When I ran it, I got some Debugger Exception Notification (the little mess...
If I have a program that uses threading and Queue, how do I get exceptions to stop execution? Here is an example program, which is not possible to stop with ctrl-c (basically ripped from the python docs).
from threading import Thread
from Queue import Queue
from time import sleep
def do_work(item):
sleep(0.5)
print "working" , ...
Hi
I've been using RMI for a project I am currently working on and I want to bind from multiple hosts to a single RMI registry.
However when I attempt to do so I get an error saying
java.rmi.AccessException: Registry.Registry.bind disallowed; origin / 192.168.0.9 is non-local host
I did so googling and it seems that RMI stops remote...
Hi guys,
I'm searching for a good website or a books that give great example of Exception Handling in C# 2008 such as SQL exception management and all the other. I'm programming in 3 tiers.
I'm already doing it well in VB .Net 2008 and I'm now moving foward to C#. The transition isn't hard, but I need a bit more information about excep...
Hi guys,
i'm writing a dll which is a wrapper to a access database. and i'm pretty new to c# in general as my background is in web development LAMP with perl, i'm not sure what's a good way to return error to a calling app in case they pass the wrong parameters to my functions or what not.
I have no idea as of now except to probably do ...
i am trying to create a mock shopping cart for a uni project. im using two java classes Item and shoppingCart, shopping cart uses a vector to store Items and then writes them to a file. i am trying to use the classes on a jsp page but when i try to write to the file i get an java.io.WriteAbortedException: writing aborted; java.io.NotSeri...
I am trying to throw a (custom) ImportException from the method importUsers in class UserHelper. I can see in the debugger that the throw clause is executed, but the method, from which the importUsers method is called, never catches the exception.
Here is the method, where the exception is thrown:
public static AccessorValidator impor...