Pal Chakraborty
Pal Chakraborty

Reputation: 57

Eclipse Display View is throwing error

all. Amy requirement is checking one exception condition(whether the message is alright or not). For that, I have thrown exception keeping my code in debug mode.

I have written following expression, right click after selecting the expression, execute.

throw new NullPointerException();

Eclipse is showing

Evaluation failed. Reason(s):
        Syntax error, insert ";" to complete BlockStatements

Can any one help me please?

Upvotes: 1

Views: 1093

Answers (1)

Dzmitry Martynau
Dzmitry Martynau

Reputation: 31

Wrap in curly brackets and press Ctrl+U. Should work in neon.

{throw new NullPointerException();}

Upvotes: 3

Related Questions