Question: `Integer.parseInt("5")` and `Long.parseLong("5")` are throwing an `UnsupportedOperationException` in the Eclipse Expressions Window.

![Eclipse Environment Screenshot](https://i.stack.imgur.com/d5Yjj.png)

I think this is also the Exception I'm getting at runtime, but being new to Eclipse, I'm not sure how to find the type of `e` within a debug session:

```
public static long longTryParse(String text, long fallbackValue) {
  try {
    return Long.parseLong(text);
  } catch (Exception e) {
    return fallbackValue; // When stopping at a breakpoint here, Eclipse says that e is of type 'Exception'.  Well, that's informative.
  }
}

```

So ... 

1. Are these valid statements?
2. If so, why am I getting an exception?
3. (Of lesser importance) Why won't Eclipse say that e is of type UnsupportedOperationException rather than Exception during my debug session?

Thanks!

Answer: 
According to [java docs](http://download.oracle.com/javase/6/docs/api/java/lang/Integer.html#parseInt%28java.lang.String%29) parseInt can throw only NumberFormatException,it means UnsupportedException comes from different place in your code.

**parseInt**

```
public static int parseInt(String s)
                    throws NumberFormatException

```

> 
> Parses the string argument as a signed decimal integer. The characters
>  in the string must all be decimal
>  digits, except that the first
>  character may be an ASCII minus sign
>  '-' ('\u002D') to indicate a negative
>  value. The resulting integer value is
>  returned, exactly as if the argument
>  and the radix 10 were given as
>  arguments to the
>  parseInt(java.lang.String, int)
>  method.
> 
> 
>
try to put sysout in catch block which shows the type of the exception.

```
System.out.println(e);

```

and moreover as suresh mention it can throw only NumberFormatException