HowTo Raise an exception during debug

I am working with IntelliJ 6.0 to debug a tomcat server (jboss).
Suppose I (remote) debug some code.
In a certain point I would like to simulate an exception so a specific Exception (Application-Specific Exception not NullPointerException) will be thrown and be caught on some try{}catch() somewhere above (below?) in the call stack.
Is there any way to do it?
Thanks,
Izik

1 comment
Comment actions Permalink

Hello Izik,

I am working with IntelliJ 6.0 to debug a tomcat server (jboss).

Suppose I (remote) debug some code.

In a certain point I would like to simulate an exception so a specific
Exception (Application-Specific Exception not NullPointerException)
will be thrown and be caught on some try{}catch() somewhere above
(below?) in the call stack.

Is there any way to do it?


Try evaluating "throw new MyException()" using Alt-F8.

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.