Explorar el Código

优化上传异常捕获

Karson hace 1 año
padre
commit
31b307a4a1
Se han modificado 1 ficheros con 2 adiciones y 0 borrados
  1. 2 0
      application/api/controller/Common.php

+ 2 - 0
application/api/controller/Common.php

@@ -137,6 +137,8 @@ class Common extends Api
                 $attachment = $upload->upload();
             } catch (UploadException $e) {
                 $this->error($e->getMessage());
+            } catch (\Exception $e) {
+                $this->error($e->getMessage());
             }
 
             $this->success(__('Uploaded successful'), ['url' => $attachment->url, 'fullurl' => cdnurl($attachment->url, true)]);