@@ -282,7 +282,7 @@ public function create(array $data)
282282 return $ server ->id ;
283283 } catch (\GuzzleHttp \Exception \TransferException $ ex ) {
284284 DB ::rollBack ();
285- throw new DisplayException ('An error occured while attempting to create the server: ' . $ ex-> getMessage () );
285+ throw new DisplayException ('An error occured while attempting to create the server. ' , $ ex );
286286 } catch (\Exception $ ex ) {
287287 DB ::rollBack ();
288288 Log:error ($ ex );
@@ -530,7 +530,7 @@ public function changeBuild($id, array $data)
530530 return true ;
531531 } catch (\GuzzleHttp \Exception \TransferException $ ex ) {
532532 DB ::rollBack ();
533- throw new DisplayException ('An error occured while attempting to update the configuration: ' . $ ex-> getMessage () );
533+ throw new DisplayException ('An error occured while attempting to update the configuration. ' , $ ex );
534534 } catch (\Exception $ ex ) {
535535 DB ::rollBack ();
536536 throw $ ex ;
@@ -647,7 +647,7 @@ public function updateStartup($id, array $data, $admin = false)
647647 return true ;
648648 } catch (\GuzzleHttp \Exception \TransferException $ ex ) {
649649 DB ::rollBack ();
650- throw new DisplayException ('An error occured while attempting to update the server configuration: ' . $ ex-> getMessage () );
650+ throw new DisplayException ('An error occured while attempting to update the server configuration. ' , $ ex );
651651 } catch (\Exception $ ex ) {
652652 DB ::rollBack ();
653653 throw $ ex ;
@@ -697,8 +697,7 @@ public function deleteServer($id, $force)
697697 return true ;
698698 } else {
699699 DB ::rollBack ();
700- Log::error ($ ex );
701- throw new DisplayException ('An error occured while attempting to delete the server on the daemon: ' . $ ex ->getMessage ());
700+ throw new DisplayException ('An error occured while attempting to delete the server on the daemon. ' , $ ex );
702701 }
703702 } catch (\Exception $ ex ) {
704703 DB ::rollBack ();
@@ -768,7 +767,7 @@ public function updateSFTPPassword($id, $password)
768767 ]);
769768 return true ;
770769 } catch (\GuzzleHttp \Exception \TransferException $ ex ) {
771- throw new DisplayException ('There was an error while attmping to contact the remote service to change the password. ' );
770+ throw new DisplayException ('There was an error while attmping to contact the remote service to change the password. ' , $ ex );
772771 } catch (\Exception $ ex ) {
773772 throw $ ex ;
774773 }
0 commit comments