handle exceptions in image filters