Pregunta

I am trying to set up sphinx, i am following this tutorial. When i copy and paste the code of hello world from "sphinx4-0.1alpha-src"; i get an error on line:

} catch (InstantiationException e) {

Error says Unreachable catch block for InstantiationException.

This exception is never thrown from the try statement body. I mean i have not written this code, and even in the video there is this line but no error comes up. I know that it is not a big deal and if i run the program and click avoid the error, it runs properly. enter image description here [I am using Eclipse "eclipse-standard-kepler-SR1-win32-x86_64" on a windows 8 machine]

List of files in that folder: build.xml hello.gram helloworld.config.xml HelloWorld.java helloworld.Manifest README.html

Ques - why do i see this error at all? (I think there is not a problem in the code as it is alpha edition of sphnix)

¿Fue útil?

Solución

It could be because this exception is never declared to be thrown from your try{} block, just remove last catch block

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top