Finding the usages of a thrown exception

I remember reading a while back that there was a way to find where an exception is caught from where it is thrown.

So if I have:

public void a() throws FooException
{
throw new FooException();
}

public void b() throws FooException
{
a();
}

public void c()
{
try {
b();
} catch FooException
{
stuff();
}
}

It would jump from throw FooException in method a() to the catch clause of FooException in method c() based on the call hierarchy and exceptions.

Was I dreaming? And if this isn't currently implemented does it sound like a good idea?

Mike

0
2 comments

Invoke Find Usages (Alt+F7) on throw keyword.
-


Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"

I remember reading a while back that there was a way to find where an
exception is caught from where it is thrown.

So if I have:

public void a() throws FooException
{
throw new FooException();
}
public void b() throws FooException
{
a();
}
public void c()
{
try {
b();
} catch FooException
{
stuff();
}
}
It would jump from throw FooException in method a() to the catch
clause of FooException in method c() based on the call hierarchy and
exceptions.

Was I dreaming? And if this isn't currently implemented does it sound
like a good idea?

Mike



0

MS> Invoke Find Usages (Alt+F7) on throw keyword.

Just did: http://www.intellij.net/tracker/idea/viewSCR?publicId=45112

:)



0

Please sign in to leave a comment.