Making sure that the exception will be marked a serializable.