Catch PDO error when no connection is set

When no connection is set, the profiler crashes. Catch the PDO exception, to make it work without database.
Merge pull request #15 from barryvdh/patch-3

Catch PDO error when no connection is set