Skip to content

Commit 29835e5

Browse files
committed
Merge pull request #162 from johanobergman/rewrite
Let the caller see exceptions instead of hiding them
2 parents cfc0736 + d63008b commit 29835e5

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/Console/ClientCreatorCommand.php

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,11 @@ public function fire()
5757
$clientId = $this->argument('clientId');
5858
$clientSecret = $this->argument('clientSecret');
5959

60-
try {
61-
$this->clientRepo->create($clientName, $clientId, $clientSecret);
62-
$this->info('Client created successfully');
63-
$this->info('Client Name: '.$clientName);
64-
$this->info('Client ID: '.$clientId);
65-
$this->info('Client Secret: '.$clientSecret);
66-
} catch(\Exception $e) {
67-
$this->error('A client with the same Name, Id or Secret already exists. Try again.');
68-
}
60+
$this->clientRepo->create($clientName, $clientId, $clientSecret);
61+
$this->info('Client created successfully');
62+
$this->info('Client Name: '.$clientName);
63+
$this->info('Client ID: '.$clientId);
64+
$this->info('Client Secret: '.$clientSecret);
6965
}
7066

7167
/**

0 commit comments

Comments
 (0)