Skip to content

Commit

Permalink
chore: Use class names instead of magic string literals in exceptions
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Niedermann <[email protected]>
  • Loading branch information
stefan-niedermann committed Jan 18, 2024
1 parent a20a2de commit 598d87f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ private SimpleSQLiteQuery getQueryForFilter(@NonNull FilterInformation filter, @
query.append("and datetime(c.duedate/1000, 'unixepoch', 'localtime') between datetime('now', 'localtime') and datetime('now', '+30 day', 'localtime')");
break;
default:
throw new IllegalArgumentException("You need to add your new EDueType value\"" + filter.getDueType() + "\" here!");
throw new IllegalArgumentException("You need to add your new " + EDueType.class.getSimpleName() + " value\"" + filter.getDueType() + "\" here!");
}
}

Expand All @@ -380,7 +380,7 @@ private SimpleSQLiteQuery getQueryForFilter(@NonNull FilterInformation filter, @
query.append("and (c.done is null or c.done = 0)");
break;
default:
throw new IllegalArgumentException("You need to add your new EDueType value\"" + filter.getDueType() + "\" here!");
throw new IllegalArgumentException("You need to add your new " + EDoneType.class.getSimpleName() + " value\"" + filter.getDueType() + "\" here!");
}
}

Expand Down

0 comments on commit 598d87f

Please sign in to comment.