errorlib.py: Modified register_exception function

* Do not report KeyboardInterrupt exception
* fixes #1701