Browse Source

catched ludbo exception

tags/0.1.10
Robin Thoni 8 years ago
parent
commit
97e0a85180
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/Utils/LuRoute.php

+ 7
- 0
src/Utils/LuRoute.php View File

@@ -2,6 +2,8 @@
2 2
 
3 3
 namespace Luticate\Utils;
4 4
 
5
+use Luticate\Utils\Dbo\LuDboDeserializeException;
6
+
5 7
 class LuRoute {
6 8
 
7 9
     const REG_UINT = "[0-9]+";
@@ -68,6 +70,11 @@ class LuRoute {
68 70
                 $json = json_decode($value, true);
69 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 78
             catch (\Exception $e)
72 79
             {
73 80
                 LuLog::log($e);

Loading…
Cancel
Save