From edc86d2c28f2b836aa4c404e5d2a6253283207f0 Mon Sep 17 00:00:00 2001 From: Adrian Salceanu Date: Wed, 25 Oct 2023 19:45:57 +0300 Subject: [PATCH] Parse generic errors from logs --- Project.toml | 2 +- src/GenieDevTools.jl | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4dea814..c7505e8 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GenieDevTools" uuid = "4e5d9629-6565-4102-a9ff-45c707eb060e" authors = ["essenciary and contributors"] -version = "2.6.0" +version = "2.7.0" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/GenieDevTools.jl b/src/GenieDevTools.jl index e752f7f..bd2105f 100644 --- a/src/GenieDevTools.jl +++ b/src/GenieDevTools.jl @@ -95,6 +95,15 @@ function parselog(line::AbstractString) :: Union{AbstractString,Nothing} return "log:critical:parse_error $(m.captures[2])" end + # catch generic error + r = r"""┌ Error: (.*) + (.*) + (.*)""" + m = match(r, line) + if ! isnothing(m) && length(m.captures) >= 3 + return "log:critical:application $(m.captures[1])" + end + return end