/* * Copyright (C) Alibaba Cloud Computing * All rights reserved. * * 版权所有 (C)阿里云计算有限公司 */ using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Text; namespace Aliyun.Api.LOG { /// /// The Exception of the sls request and response. /// public class LogException : ApplicationException { private String _errorCode; private String _requestId; /// /// Get Sls sever requestid. /// public String RequestId { get { return _requestId; } } /// /// Get LogException error code. /// public String ErrorCode { get { return _errorCode; } } /// /// LogException constructor /// /// error code /// error message /// request identifier public LogException(String code, String message,String requestId = "") : base(message) { _errorCode = code; _requestId = requestId; } /// /// LogException constructor /// /// error code /// error message /// the inner exception wrapped by LogException /// public LogException(String code, String message, Exception innerException, String requestId = "") : base(message, innerException) { _errorCode = code; _requestId = requestId; } /// /// get string presentation of LogException /// /// object in string public override String ToString() { String msgFormat = @"ErrorCode : {0}, Message: {1}, RequestId: {2}"; return String.Format(msgFormat, _errorCode, Message, _requestId); } } }