From 2f5ceae69958d4e02ada4202ae65f52d7576d306 Mon Sep 17 00:00:00 2001
From: Virgile Prevosto <virgile.prevosto@m4x.org>
Date: Fri, 8 Nov 2019 15:30:54 +0100
Subject: [PATCH] =?UTF-8?q?[logic]=20don't=20trust=20extension=20function?=
 =?UTF-8?q?=20to=20catch=20their=20Not=5Ffound=20exceptions=20=F0=9F=99=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/kernel_services/ast_queries/logic_typing.ml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/src/kernel_services/ast_queries/logic_typing.ml b/src/kernel_services/ast_queries/logic_typing.ml
index c255a3c6a87..f855e465650 100644
--- a/src/kernel_services/ast_queries/logic_typing.ml
+++ b/src/kernel_services/ast_queries/logic_typing.ml
@@ -539,11 +539,12 @@ module Extensions = struct
     end
 
   let typer name ~typing_context:typing_context ~loc p =
-    try
-      let status,typer = find_typer name in
-      status, typer ~typing_context ~loc p
-    with Not_found ->
-      Kernel.fatal ~source:(fst loc) "unsupported clause of name '%s'" name
+    let status,typer =
+      try find_typer name
+      with Not_found ->
+        Kernel.fatal ~source:(fst loc) "unsupported clause of name '%s'" name
+    in
+    status, typer ~typing_context ~loc p
 end
 
 let register_behavior_extension name f =
-- 
GitLab