Closed Yousha closed 10 months ago
Replace exit/die by throw new RuntimeException.
exit
die
throw new RuntimeException
By throwing Exception we can terminate process like Exit, plus developers could be able to catch and handle errors across their applications.
This is also best practice to handle errors in libraries.
Replace
exit
/die
bythrow new RuntimeException
.By throwing Exception we can terminate process like Exit, plus developers could be able to catch and handle errors across their applications.
This is also best practice to handle errors in libraries.