Set default value for dsn variable to empty string in order to avoid syntax error
Use a Silex error handler to display more meaningful error messages when debug mode is off