Write error on canvas if error happen.