Basically, all exceptions thrown within the check method of a checks.d will be caught and displayed in the agent info page. So you have two options:
1. Do not try to catch this exception as it's done for postgres: https://github.com/DataDog/dd-agent/blob/master/checks.d/postgres.py#L63
2. Catch the exception and raise another one with a more friendly user message as it's done for redis:
https://github.com/DataDog/dd-agent/blob/master/checks.d/redisdb.py#L144-L147