Explorar el Código

debug errorcode

andre hace 5 días
padre
commit
27ac74d2d7

+ 0 - 9
core/HandlerError/Exceptions/Exception.php

@@ -57,15 +57,6 @@ class Exception extends \Exception
 
 
     public function __construct($errorCode = null, $additionalData = null, $toTranslate = null, $originalException = null)
     public function __construct($errorCode = null, $additionalData = null, $toTranslate = null, $originalException = null)
     {
     {
- 
-        logModuleCall(
-            'proxmoxCloud',
-            __FUNCTION__,
-            $errorCode,
-            'Debug Error',
-            $this
-        );
-        
         $this->errorCode = $this->genErrorCode(($errorCode ? : self::DEFAULT_ERROR_CODE));
         $this->errorCode = $this->genErrorCode(($errorCode ? : self::DEFAULT_ERROR_CODE));
 
 
         $this->setAdditionalData($additionalData);
         $this->setAdditionalData($additionalData);

+ 8 - 0
core/Traits/ErrorCodesLibrary.php

@@ -33,6 +33,14 @@ trait ErrorCodesLibrary
     public function genErrorCode($code = null)
     public function genErrorCode($code = null)
     {
     {
         $this->loadErrorCodes();
         $this->loadErrorCodes();
+ 
+        logModuleCall(
+            'proxmoxCloud',
+            __FUNCTION__,
+            $code,
+            'Debug Error',
+            $this
+        );
 
 
         if ($this->errorCodesAppHandler->errorCodeExists($code[ErrorCodes::CODE]))
         if ($this->errorCodesAppHandler->errorCodeExists($code[ErrorCodes::CODE]))
         {
         {