Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
grew
libcaml-grew
Commits
af8d2c30
Commit
af8d2c30
authored
May 08, 2017
by
Bruno Guillaume
Browse files
Fix exception Not_found when strategy is unknown
parent
07d8f8e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grew_grs.ml
View file @
af8d2c30
...
...
@@ -272,7 +272,12 @@ module Grs = struct
(* ---------------------------------------------------------------------------------------------------- *)
let
rewrite
grs
strategy_name
graph
=
let
strategy
=
List
.
find
(
fun
s
->
s
.
Ast
.
strat_name
=
strategy_name
)
grs
.
strategies
in
let
strategy
=
try
List
.
find
(
fun
s
->
s
.
Ast
.
strat_name
=
strategy_name
)
grs
.
strategies
with
Not_found
->
Error
.
run
"[rewrite] Undefined stategy
\"
%s
\"\n
Available stategies: %s"
strategy_name
(
String
.
concat
"; "
(
List
.
map
(
fun
s
->
s
.
Ast
.
strat_name
)
grs
.
strategies
))
in
let
rec
old_loop
instance
module_list
=
match
module_list
with
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment