RaiseError doesn't work for the initial ->connect statement. You need to check that one manually.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^3: error catching by diotalevi in thread error catching by Anonymous Monk