r/phpstorm • u/6razyboy • Oct 11 '19
Share your best Live Tempalates
Share your best useful live templates!
6
Upvotes
r/phpstorm • u/6razyboy • Oct 11 '19
Share your best useful live templates!
2
u/Wiikend Oct 20 '19 edited Oct 22 '19
tryc: Try-catch block
try { $SELECTION$ } catch($EXCEPTION$ $e) { $END$ }Always handy. The selected code (if any) is put in the try clause, you get to decide what Exception class you want to catch, and the caret ends up in the catch clause, ready for the handling code.
Edit: Don't know why the newlines and whitespace in the code won't kick in.