aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2023-01-13 11:23:09 +0100
committerfiaxh <git@lightrise.org>2023-01-13 11:44:28 +0100
commit73c0263f35a73b68d20d299ee7fe8c37b9a6ffeb (patch)
tree5ccc55e0b8a6324199559abac590bc1da99bc6b6 /main/src/ui/util
parent860c72bfc93d252d45eb97e71cf9ff22985c7ef9 (diff)
downloaddino-73c0263f35a73b68d20d299ee7fe8c37b9a6ffeb.tar.gz
dino-73c0263f35a73b68d20d299ee7fe8c37b9a6ffeb.zip
Add debug outputs to summarize_whitespaces_to_space and don't assert_not_reached
related #1335
Diffstat (limited to 'main/src/ui/util')
-rw-r--r--main/src/ui/util/helper.vala3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala
index 58614bb8..ecf0ab25 100644
--- a/main/src/ui/util/helper.vala
+++ b/main/src/ui/util/helper.vala
@@ -419,7 +419,8 @@ public string summarize_whitespaces_to_space(string s) {
try {
return (/\s+/).replace_literal(s, -1, 0, " ");
} catch (RegexError e) {
- assert_not_reached();
+ critical("RegexError when summarizing whitespaces in '%s': %s", s, e.message);
+ return s;
}
}