Skip to content

Commit

Permalink
Merge pull request #136 from control-toolbox/onepass-fix
Browse files Browse the repository at this point in the history
fixed __wrap and __throw
  • Loading branch information
ocots authored May 20, 2024
2 parents 98592d9 + 275c9f1 commit 32d0905
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/onepass.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 32d0905

Please sign in to comment.