code: public Exception cancel(Exception error) {
  		cancelled = true;
  		if (error != null) {
  			this.error = error;
  		}
  		return error;
  	}
docs: Can be called in before_EVENT or leave_STATE to cancel the
  current transition before it happens. It takes an optional error,
  which will overwrite the event's error if it had already been set.