KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a method like this: public void getSomething(){ ... } I want to throw an Exception inside getSomething() . The compiler will not allow me to do that because my method doesn't allow Exception to be thrown in there. But I need to throw a subclass of Exception for my testing (I can't throw Unchecked Exception ) . This is clearly a hack but I need it for my testing. I tried EasyMock but it doesn't allow me to do that either. Any ideas how to do that? Thanks, Sean Nguyen
Tags (comma-separated)
Save Edits
Cancel