Filter exceptions. Close #792.