Skip to content

Commit 85c9ded

Browse files
authored
Merge pull request #32 from othyn/master
Update error messages to aid in debugging
2 parents 7dd0953 + 648d8a5 commit 85c9ded

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

readme.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@ The MIT License (MIT). Please see [License File](https://github.com/publiux/lara
297297

298298
## Changelog
299299

300+
#### v2.0.5
301+
- Added connection error reporting
302+
300303
#### v2.0.4
301304
- Added API support for DigitalOcean Spaces
302305

src/Publiux/laravelcdn/Providers/AwsS3Provider.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,7 @@ public function upload($assets)
199199

200200
$this->s3_client->execute($command);
201201
} catch (S3Exception $e) {
202-
$this->console->writeln('<fg=red>'.$e->getMessage().'</fg=red>');
203-
202+
$this->console->writeln('<fg=red>Upload error: '.$e->getMessage().'</fg=red>');
204203
return false;
205204
}
206205
}
@@ -234,6 +233,7 @@ public function connect()
234233
)
235234
);
236235
} catch (\Exception $e) {
236+
$this->console->writeln('<fg=red>Connection error: '.$e->getMessage().'</fg=red>');
237237
return false;
238238
}
239239

@@ -347,8 +347,7 @@ public function emptyBucket()
347347

348348
$empty->delete();
349349
} catch (S3Exception $e) {
350-
$this->console->writeln('<fg=red>'.$e->getMessage().'</fg=red>');
351-
350+
$this->console->writeln('<fg=red>Deletion error: '.$e->getMessage().'</fg=red>');
352351
return false;
353352
}
354353

0 commit comments

Comments
 (0)