]
Antonio Goncalves reassigned FORGE-2091:
----------------------------------------
Assignee: Antonio Goncalves
Being able to create a new Java exception
-----------------------------------------
Key: FORGE-2091
URL:
https://issues.jboss.org/browse/FORGE-2091
Project: Forge
Issue Type: Sub-task
Components: Parsers / File Manipulation
Affects Versions: 2.12.1.Final
Reporter: Antonio Goncalves
Assignee: Antonio Goncalves
Fix For: 2.x Future
It would be good to have a command to generate a new Java exception. A simple command
such as :
{code}
java-new-exception --named MyException
{code}
Would generate :
{code}
public class MyException extends RuntimeException {
public MyException() {
super();
}
public MyException(String message) {
super(message);
}
}
{code}
Another attribute would allow to extends from whatever exception we want. So something
like :
{code}
java-new-exception --named MyException --inherits MyOtherException
{code}
{code}
public class MyException extends MyOtherException {
public MyException() {
super();
}
public MyException(String message) {
super(message);
}
}
{code}