Debug code and print message instead of exception.