fix: removed generic runtime exception
This commit is contained in:
parent
5b067d79ad
commit
0d0030e52f
4 changed files with 4 additions and 4 deletions
|
@ -121,7 +121,7 @@ public class CategoriesView extends Div implements BeforeEnterObserver {
|
|||
|
||||
delete.addClickListener(e -> {
|
||||
try {
|
||||
if (this.category == null) throw new RuntimeException("Category is null!"); //TODO: create proper exception
|
||||
if (this.category == null) throw new IllegalStateException("Category is null!");
|
||||
categoryService.delete(this.category);
|
||||
clearForm();
|
||||
refreshGrid();
|
||||
|
|
|
@ -203,7 +203,7 @@ public class ExpensesView extends Div implements BeforeEnterObserver {
|
|||
|
||||
delete.addClickListener(e -> {
|
||||
try {
|
||||
if (Objects.isNull(this.expense)) throw new RuntimeException("Expense is null!"); //TODO: create proper exception
|
||||
if (Objects.isNull(this.expense)) throw new IllegalStateException("Expense is null!");
|
||||
expenseService.delete(this.expense.getId());
|
||||
clearForm();
|
||||
refreshGrid();
|
||||
|
|
|
@ -168,7 +168,7 @@ public class PeopleView extends Div implements BeforeEnterObserver {
|
|||
|
||||
delete.addClickListener(e -> {
|
||||
try {
|
||||
if (this.person == null) throw new RuntimeException("The person is null!"); //TODO: create proper exception
|
||||
if (this.person == null) throw new IllegalStateException("The person is null!");
|
||||
personFacade.delete(this.person.getId());
|
||||
clearForm();
|
||||
refreshGrid();
|
||||
|
|
|
@ -130,7 +130,7 @@ public class UsersView extends Div implements BeforeEnterObserver {
|
|||
|
||||
delete.addClickListener(e -> {
|
||||
try {
|
||||
if (this.user == null) throw new RuntimeException("The user is null!"); //TODO: create proper exception
|
||||
if (this.user == null) throw new IllegalStateException("The user is null!");
|
||||
userService.delete(this.user);
|
||||
clearForm();
|
||||
refreshGrid();
|
||||
|
|
Loading…
Reference in a new issue