Showing posts with label exception. Show all posts
Showing posts with label exception. Show all posts

Sunday, May 20, 2012

Monday, May 7, 2012

When should I create a new Exception class


I notice that a number of Java exception classes differ only in the name of the class and do not add any new functionality. Most exceptions for example just seem to override Exception() or Exception(String message) . This goes against the tenets of inheritance ie:- inherit to add new functionality.

Tuesday, April 3, 2012

ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView


I am attempting to create a custom Adapter for my ListView since each item in the list can have a different view (a link, toggle, or radio group), but when I try to run the Activity that uses the ListView I receive an error and the app stops. The application is targeted for the Android 1.6 platform.

Wednesday, March 7, 2012

Why java people frequently consume exception silently?


I never did any serious Java coding before, but I learned the syntax, libraries, and concepts based on my existing skills (Delphi & C#). One thing I hardly understand is that I've seen soo much code that silently consume exceptions after "printStackTrace" like this:

Tuesday, February 21, 2012

Clarify what is asked for in java Exceptions assignment


It does not appear evident to me what is asked in a java assignment I have received. Does anyone understand what is needed:

Monday, February 20, 2012

Exception in thread "AWT-EventQueue-0”


Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jpcap in java.library.path

Java applet AWT-EventQueue-1 Exception


I wrote a simple implementation of the Game of life with java applets. Here's is the source code for the Applet and the Model.

Tuesday, February 14, 2012

Preventing Java from printing the stack trace on certain exceptions


I have a security class that throws an AccessDeniedException on a user not being authorized for a certain operation. I made it even neat and put a msg in there with the info I need.

Sunday, January 15, 2012

method called after release() exception unable to resume with android camera


while developing a camera app i'v encountered an exception that only happend when I switch to other intent (onPause for my app) or go to preference in my app(same, onPause)

Friday, January 13, 2012

@throws tag with exception's parent class name


Sometimes it is impossible to know really thrown exception class name in advance, only in run-time (at least in php). So is it correct to put in @throws tag the parent class of really thrown exception?