Commit af8d2c30 authored by Bruno Guillaume's avatar Bruno Guillaume

Fix exception Not_found when strategy is unknown

parent 07d8f8e7
......@@ -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\"\nAvailable 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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment