SyntaxFix
Write A Post
Hire A Developer
Questions
throw $e->getMessage();
You try to throw a string
string
As a sidenote: Exceptions are usually to define exceptional states of the application and not for error messages after validation. Its not an exception, when a user gives you invalid data