Handle exceptions during DSN creation

An InvalidDsnException must be thrown during the DSN creation if
the DSN is considered as Invalid
Add unit tests for DSN creation