From 441bcd7e62fa05953091e13dba8921a9a53f86c8 Mon Sep 17 00:00:00 2001
From: Antoine Merle <antoine.merle@epfl.ch>
Date: Thu, 20 Apr 2023 08:40:41 +0000
Subject: [PATCH] Avoid duplication of catch blocks

---
 matlab/JET/gdat_jet.m | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/matlab/JET/gdat_jet.m b/matlab/JET/gdat_jet.m
index 7a36ec5c..28b88ef5 100644
--- a/matlab/JET/gdat_jet.m
+++ b/matlab/JET/gdat_jet.m
@@ -1376,11 +1376,7 @@ elseif strcmp(mapping_for_jet.method,'switchcase')
       try
 	ic=gdat_jet(shot,params_eff);
         if isempty(ic.data) || isempty(ic.dim)
-          params_eff.data_request={'ppf','icrh','ptot'};
-          try
-            ic=gdat_jet(shot,params_eff);
-          catch
-          end
+          error('Unable to get ppf/rff/ptot'); % Effectively a shortcut to the next catch block
         end
       catch
         params_eff.data_request={'ppf','icrh','ptot'};
-- 
GitLab