Selaa lähdekoodia

catched ludbo exception

tags/0.1.10
Robin Thoni 8 vuotta sitten
vanhempi
commit
97e0a85180
1 muutettua tiedostoa jossa 7 lisäystä ja 0 poistoa
  1. 7
    0
      src/Utils/LuRoute.php

+ 7
- 0
src/Utils/LuRoute.php Näytä tiedosto

2
 
2
 
3
 namespace Luticate\Utils;
3
 namespace Luticate\Utils;
4
 
4
 
5
+use Luticate\Utils\Dbo\LuDboDeserializeException;
6
+
5
 class LuRoute {
7
 class LuRoute {
6
 
8
 
7
     const REG_UINT = "[0-9]+";
9
     const REG_UINT = "[0-9]+";
68
                 $json = json_decode($value, true);
70
                 $json = json_decode($value, true);
69
                 $typedValue = call_user_func_array(array($class->getName(), "jsonDeserialize"), array($json));
71
                 $typedValue = call_user_func_array(array($class->getName(), "jsonDeserialize"), array($json));
70
             }
72
             }
73
+            catch (LuDboDeserializeException $e)
74
+            {
75
+                LuLog::log($e);
76
+                LuBusiness::badInput("Unable to parse JSON value for " . $param->getName() . ": " . $e->getMessage());
77
+            }
71
             catch (\Exception $e)
78
             catch (\Exception $e)
72
             {
79
             {
73
                 LuLog::log($e);
80
                 LuLog::log($e);

Loading…
Peruuta
Tallenna