Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SneakyThrows without parameters should default to Throwable.class #146

Closed
lombokissues opened this issue Jul 14, 2015 · 5 comments
Closed
Labels

Comments

@lombokissues
Copy link

Migrated from Google Code (issue 73)

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Dec 01, 2009 at 22:48 UTC

What steps will reproduce the problem?

  1. Write the following code
    class Test {
    @ SneakyThrows void test() {
    throw new Exception();
    }
    }
  2. Compile with java -cp lombok.jar Test.java

What is the expected output? What do you see instead?
I expected it to compile. Instead I get a compiler error:

Test.java:3: unreported exception java.lang.Exception; must be caught or
declared to be thrown
throw new Exception();
^
1 error

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Dec 02, 2009 at 00:33 UTC

It seems to be a javac-only problem. On Eclipse this works as expected.

@lombokissues
Copy link
Author

👤 r.spilker   🕗 Dec 02, 2009 at 01:01 UTC

Fixed in 1f4fb2f Will be delivered in 0.9.2 release.

@lombokissues
Copy link
Author

👤 reinierz   🕗 Feb 07, 2011 at 21:34 UTC

@lombokissues
Copy link
Author

End of migration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant