exception

SEAM integration test

I am writing SEAM integration test using Oficial RedHat tutorial. On running any test exception appears: FAILED: testOperation java.lang.NullPointerException at java.lang.String.startsWith(String.java:1421) at java.lang.String.startsWith(String.java:1450) at org.ajax4jsf.webapp.WebXml.getFacesResourceKey(WebXml.java:189) at org.a...

Where to throw an exception in layered architecture?

I've an application that offers its Business Layer through a Service Layer developed with WCF. What I'm thinking about is: this service layer offers operational method like Create, Update and so on. These operation then reroute these calls to the Business Layer. The question is: suppose that one of these call doesn't accept a null input ...

Getting python exceptions printed the normal way with PyObjC

I'm getting errors like this: 2010-07-13 20:43:15.131 Python[1527:60f] main: Caught OC_PythonException: : LoginMenuSet instance has no attribute 'play_sound' That's with this code: @try { [section loop]; //Loop through section } @catch (NSException *exception) { NSLog(@"Caught %@: %@", [exception name], [exception ...

xmlaclient.Discover(MDSCHEMA_MODULES,...) System out of memory exception

When I try to drill down into a cube in our client application, I use xmlaclient.Discover method to discover the SSAS metadata. When I've drilled down to the about the 7th level I get a system out of memory exception. The stack trace is as below- This is running on a Windows 2008 server, 2008 ssas server and the application is on a windo...

NHibernate - how do you know if database operation succeeded?

Hi all If for example, I call session.Save(myObject), how do I determine if the operation succeeded or if it failed because my database server has been dropped out of a hang glider? Does NHibernate throw a particular type of exception in this circumstance? Thanks David ...

Intermittant exception in Application_Start - how do I un-start the application?

In our Application_Start event handler we're performing some actions that intermittently fail due to file locking issues. In this scenario we would like to return the application to an "un-started" state. By this I mean that the user will be shown an error page, and then the next time a user hits the site the Application_Start event wil...

starting activity on uncaughtException() call

I want to start a new activity from my UncaughtExceptionHandler when an uncaught exception appears. Is this possible? I think the current activity can't start a new child activity in its "error" state because I always get this errors: 07-14 14:34:06.075: INFO/ActivityManager(74): Starting activity: Intent { flg=0x10000000 cmp=de.rwth/s...

Java: Create static class member whose constructor could throw an exception

I have a static setter that is used to set all instances of MyClass: public class MyClass { .... protected static final Setter setter = new Setter(); ... } However this does not compile since the setter constructor throws an exception: public class Setter { public Setter() throws FileNotFoundException { ...

c++ exception-like message passing

I'm working on developing a fairly robust 2D game engine as a base that other games can be built off of as a for-fun project (I know theres already things that do this, but that's no fun). I'm trying to figure out a good way to do message-passing between classes within the engine. At first I was thinking about using a heirarchy of exce...

Error Page Return a Status Code 200 default response

We would like to implement a "fault barrier" strategy for managing exceptions in our applications. One thing our applications have is the concept of a "passback" response, basically a no-op, which we'd like to return in preference to throwing 500, 400, etc. HTTP status codes - e.g. our external facing applications should always return a ...

Something can go wrong but it is not an exception

I am often in a situation where I have a method where something can go wrong but an exception would not be right to use because it is not exceptional. For example: I am designing a monopoly game. The class Bank has a method buyHouse and a field which counts the number of houses left(there is 32 houses in monopoly). Something that could...

Cryptographic Exception: Input is not a complete block.

This is a segment of code I have for setting the masterpassword: private void button1_Click(object sender, EventArgs e) { string current = textBox1.Text; string newPass = textBox2.Text; string confirmed = textBox3.Text; string massPass = "winxp.pma"; if (File.Exists(massPass)) { ...

Error After Migrating from .NET3.5 to .NET4.0

I have a test declared as: [Test] [ExpectedException(typeof(FaultException<ArgumentException>))] public void ShouldNotBeAbleToDeleteASystemList() When I run this in VS2008 targeting .net 3.5 it all works fine and the test passes as the exception is thrown. I have migrated the solution to VS2010 and changed the target fram...

NHibernate MappingException: Could not compile the mapping document

Hi all On my dev web app NHibernate is working just dandy. When I precompile and deploy the site, I get a MappingException when the SessionFactory is created. Here's some info from the trace: NHibernate.Cfg.Environment 2010-07-15 09:20:59,577 [7] INFO NHibernate.Cfg.Environment [(null)] - NHibernate 2.1.2.4000 (2.1.2.4000) 0.452...

EXC_BAD_ACCESS in for loop

Hi Can anyone enlighten me as to why i'm getting an EXC_BAD_ACCESS on this chunk of code? I ran Instruments with Allocations and NSZombie enabled, and it said i messaged a zombie, but can't see whats up with it. NSMutableArray *keys = [NSMutableArray arrayWithContentsOfFile:[[NSBundle mainBundle] pathForResource: @"keys" ofType:@"plist...

VS2008 debugger breaks at unwanted line

Visual Studio 2008 breaks at the following line with the following message: I don't want it to stop there, it's making debugging a nightmare. Somehow the exception thrown at line 998 is causing this, even though there is a try...catch block somewhere up there that is supposed to catch this exception. Any ideas on how to stop this from ...

Changing collection from CollectionChanged event

Hello, I want to update collection after it was changed but I can't seem to get "away" from this exception: Cannot change ObservableCollection during a CollectionChanged or PropertyChanged event. Inside event handler I unsubscribe from Collection changed event before changing anything to prevent infinite loops and after changes are ma...

How to catch a MessagingException on Apache Axis

On my Axis 1.4 webservice this exception is thrown when an incoming message is corrupted. WARN ;2010-07-15 14:45:38,232;org.apache.axis.attachments.AttachmentsImpl;;Exception: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: javax.mail.MessagingException: Error in input ...

exception in java

private String getEmailTemplateWithActualValueForAccount(String template, Account account) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException { Map<String,String> map = new HashMap<String, String>(); List<String> listTags = new ArrayList<String>(); Map<Method, String> methodList = new HashMap...

Avoid exception in WebRequestObject

I am reading data from a website as follows: webRequestObj = (HttpWebRequest)WebRequest.Create("http://localhost/503errorPage.php"); theResponse = webRequestObj.GetResponse(); theResponseStream = theResponse.GetResponseStream(); theStreamReader = new StreamReader(theResponseStream); theWholePage = theStreamReader.ReadToEnd(); If I get...