Skip to content

Commit

Permalink
Do not use assert_not_reached()
Browse files Browse the repository at this point in the history
Since it terminates the app immediately
  • Loading branch information
ryonakano committed Apr 23, 2024
1 parent 81d6f57 commit 888f872
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/Case.vala
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ namespace ChCase {
case Case.SENTENCE:
return "sentence";
default:
assert_not_reached ();
warning ("Invalid Case: %d", this);
return "";
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion lib/Converter.vala
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,8 @@ namespace ChCase {
regex_pattern = new PatternType.Sentence (result_case);
break;
default:
assert_not_reached ();
warning ("Invalid Case: %d", source_case);
return result;
}

try {
Expand Down

0 comments on commit 888f872

Please sign in to comment.