Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.help > #1593
| From | Lew <noone@lewscanon.com> |
|---|---|
| Newsgroups | comp.lang.java.help |
| Subject | Re: Catching Thrown Exceptions |
| Date | 2012-02-21 16:17 -0800 |
| Organization | albasani.net |
| Message-ID | <ji1c69$7fe$2@news.albasani.net> (permalink) |
| References | <6693b355-c89b-4855-b6d3-0ed7e532cc88@c21g2000yqi.googlegroups.com> <6fdd37f5-a76c-4c6d-95e5-97e1e1bd10ab@h6g2000yqk.googlegroups.com> |
On 02/21/2012 12:35 PM, Davej wrote:
> On Feb 21, 12:36 am, Davej<galt...@hotmail.com> wrote:
>> [...]
>
> Now here it complains that it could not compile a class -- but I told
> it to "clean and build" the main project and this process ended
> silently -- to me that means it compiled successfully and this is a
> runtime error. This occurred INSIDE a try block.
"To you" is not an engineering evaluation, since obviously your knowledge is
insufficient.
Also, you have a *compilation* error, so how do you conclude that compilation
was successful? It obviously failed.
> ---------------------------
>
> HTTP Status 500 -
>
> type Exception report
>
> message
>
> description The server encountered an internal error () that prevented
> it from fulfilling this request.
>
> exception
You never declared the variable.
> org.apache.jasper.JasperException: Unable to compile class for JSP:
There you have it - *Unable to compile*.
You have a compilation error.
> An error occurred at line: 59 in the jsp file: /CalcLoan.jsp
> exception cannot be resolved to a variable
> 56: {
> 57: //throw new Exception(); //jump to the catch code
> 58: //rad = 0; //abort
> 59: throw exception;
> 60: }
> 61:
> 62: if ( rad == 1 )
>
>
> Stacktrace:
>
> org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:
> 102)
>
> org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:
> 331)
> org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:
> 457)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
> org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
You have to do little things like declare all variables in Java.
--
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg
Back to comp.lang.java.help | Previous | Next — Previous in thread | Find similar
Catching Thrown Exceptions Davej <galt_57@hotmail.com> - 2012-02-20 22:36 -0800
Re: Catching Thrown Exceptions Lew <noone@lewscanon.com> - 2012-02-20 23:33 -0800
Re: Catching Thrown Exceptions Eric Sosman <esosman@ieee-dot-org.invalid> - 2012-02-21 07:58 -0500
Re: Catching Thrown Exceptions Roedy Green <see_website@mindprod.com.invalid> - 2012-02-21 10:12 -0800
Re: Catching Thrown Exceptions Davej <galt_57@hotmail.com> - 2012-02-21 11:56 -0800
Re: Catching Thrown Exceptions Lew <noone@lewscanon.com> - 2012-02-21 16:14 -0800
Re: Catching Thrown Exceptions Davej <galt_57@hotmail.com> - 2012-02-23 09:20 -0800
Re: Catching Thrown Exceptions markspace <-@.> - 2012-02-23 10:13 -0800
Re: Catching Thrown Exceptions Lew <noone@lewscanon.com> - 2012-02-23 14:34 -0800
Re: Catching Thrown Exceptions Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-02-23 14:47 -0800
Re: Catching Thrown Exceptions Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2012-02-23 20:45 -0400
Re: Catching Thrown Exceptions Jukka Lahtinen <jtfjdehf@hotmail.com.invalid> - 2012-02-22 14:02 +0200
Re: Catching Thrown Exceptions Lew <noone@lewscanon.com> - 2012-02-22 08:00 -0800
Re: Catching Thrown Exceptions Davej <galt_57@hotmail.com> - 2012-02-21 12:35 -0800
Re: Catching Thrown Exceptions Lew <noone@lewscanon.com> - 2012-02-21 16:17 -0800
csiph-web