void PopSessionCommand::Complete() { // clean up command's resource and them completes the command Cleanup(); Command::Complete(); MojRefCountedPtr<PopCommandResult> result = GetResult(); result->Done(); }
void PopSessionCommand::Failure(const exception& exc) { MojLogError(m_log, "Exception in command %s: %s", Describe().c_str(), exc.what()); Cleanup(); m_session.CommandFailed(this, MailError::INTERNAL_ERROR, exc); MojRefCountedPtr<PopCommandResult> result = GetResult(); result->SetException(exc); result->Done(); }