About Question enthuware.ocajp.i.v7.2.1023 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

About Question enthuware.ocajp.i.v7.2.1023 :

Post by ETS User »

I dont have the file ExceptionClassSummary, is there somewhere we can download it from?

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by admin »

Hello,

Please go to Study View tree and expand "Study References", there you will see a node named ExceptionClassSummary. Double click on it and the file will be extracted out to your ETS Viewer installation directory.

HTH,
Paul.

insider
Posts: 29
Joined: Wed Apr 17, 2013 9:22 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by insider »

The following snippet causes a compilation error stating that initializer is not able to complete normally:

Code: Select all

static { throw new RuntimeException(); }
But this one goes fine (except the runtime error but it's not the point):

Code: Select all

static { if (true) throw new RuntimeException(); }
Why does the compiler allow the second one to pass?

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by admin »

if(true) is a special case as explained at the bottom of this page.
As an example, the following statement results in a compile-time error:

while (false) { x=3; }
because the statement x=3; is not reachable; but the superficially similar case:

if (false) { x=3; }
does not result in a compile-time error. An optimizing compiler may realize that the statement x=3; will never be executed and may choose to omit the code for that statement from the generated class file, but the statement x=3; is not regarded as "unreachable" in the technical sense specified here.

The rationale for this differing treatment is to allow programmers to define "flag variables" such as:

static final boolean DEBUG = false;
and then write code such as:

if (DEBUG) { x=3; }
The idea is that it should be possible to change the value of DEBUG from false to true or from true to false and then compile the code correctly with no other changes to the program text.
HTH,
Paul.

Zoryanat
Posts: 20
Joined: Tue Aug 27, 2013 3:16 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by Zoryanat »

Hi
I cannot access ExceptionClassSummary: when I double click on it in Study View I get an error message in pop up window saying that "Unable to extract data due to exception: C:\windows\system32\ExceptionSummary.pdf (Access is denied).
I really need that fine - and this is second time I am posting the issue. Could you please help me out and send it to my email or smth?
My email is zoryanat@ie.ibm.com

Many thanks!
Rds
Zoryana

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by admin »

Very sorry about that. I missed your post. YOu can download it from here: http://enthuware.com/downloads/Exceptio ... ummary.pdf

BTW, you are getting the error because it is not able to extract the file in that location (c:\windows\system32). Please run ETS Viewer from a non-system location such as c:\temp and it should work.

HTH,
Paul.

Zoryanat
Posts: 20
Joined: Tue Aug 27, 2013 3:16 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by Zoryanat »

Thank you very much, Paul, that seems to sort me out.
Have a good one,
--
Rds
Zoryana

Kevin_C
Posts: 14
Joined: Mon Nov 03, 2014 5:18 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by Kevin_C »

I have a question about the ExceptionInInitializerError in general. Will this Error always pop up when you throw an Exception in an initializer-block, or are there exceptions to this where it will throw the Exception declared instead of the ExceptionInInitializerError?
Last edited by Kevin_C on Tue Nov 04, 2014 5:39 am, edited 1 time in total.

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by admin »

Basically, if the code in a static initializer throws an exception, that exception is wrapped inside ExceptionInInitializerError and ExceptionInInitializerError is thrown.
You might want to read the details here: http://docs.oracle.com/javase/7/docs/ap ... Error.html

Mushfiq Mammadov
Posts: 32
Joined: Fri Oct 16, 2015 4:33 am
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by Mushfiq Mammadov »

ExceptionClassSummaryPdf:
ArrayIndexOutOfBoundsException is subclass of RuntimeException, but ArrayIndexOutOfBoundsException extends IndexOutOfBoundsException directly, not RuntimeException.
Image

admin
Site Admin
Posts: 10389
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocajp.i.v7.2.1023 :

Post by admin »

Actually the document is trying to separate the runtime and checked exceptions that is why it says RuntimeException. But you are right. It does not directly extend RuntimeException and the sentence is misleading.
Fixed.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests