From 275c9f1b7f3963cd3952e7e239613089ced1907e Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Caillau Date: Mon, 20 May 2024 17:49:17 +0200 Subject: [PATCH] fixed __wrap and __throw --- src/onepass.jl | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/onepass.jl b/src/onepass.jl index 5e12a464..1fc8eec6 100644 --- a/src/onepass.jl +++ b/src/onepass.jl @@ -1,6 +1,5 @@ # onepass # todo: -# - for all p_... functions, write: code = quote ... end; __wrap(code, p.lnum, p.line) # - cannot call solve if problem not fully defined (dynamics not defined...) # - doc: explain projections wrt to t0, tf, t; (...x1...x2...)(t) -> ...gensym1...gensym2... (most internal first) # - test non autonomous cases @@ -36,14 +35,14 @@ __init_aliases() = begin al end -__throw(ex, n, line) = begin - quote - info = string("\nLine ", $n, ": ", $line) - throw(ParsingError(info * "\n" * $ex)) - end +__throw(ex, n, line) = quote + local info + info = string("\nLine ", $n, ": ", $line) + throw(ParsingError(info * "\n" * $ex)) end __wrap(e, n, line) = quote + local ex try $e catch ex