Skip to content

Commit 92ccb8a

Browse files
committed
refactor: throw an Exception instead of die
1 parent fb3c722 commit 92ccb8a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TopPHP/DBL.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ public function show_info(string $type, array $json = []): array
205205
break;
206206

207207
default:
208-
die("Invalid search parameter: {$type}");
208+
throw new \Exception("Invalid search parameter: {$type}");
209209
break;
210210
}
211211

@@ -231,7 +231,7 @@ public function find_info(string $type, int $id): array
231231
break;
232232

233233
default:
234-
die("Invalid search parameter: {$type}");
234+
throw new \Exception("Invalid search parameter: {$type}");
235235
break;
236236
}
237237

0 commit comments

Comments
 (0)