Message property

  1. @override
String? Message
Gets a message that describes the current exception.

Implementation

@override
String? get Message {
  // Special case for Server Error. If the server returned
  // stack trace information, include it in the exception message.
  if (this.Response.ErrorCode == ServiceError.ErrorInternalServerError) {
    if (this.Response.ErrorDetails!.containsKey(_ExceptionClassKey) &&
        this.Response.ErrorDetails!.containsKey(_ExceptionMessageKey) &&
        this.Response.ErrorDetails!.containsKey(_StackTraceKey)) {
      String? exceptionClass = this.Response.ErrorDetails![_ExceptionClassKey];
      String? exceptionMessage =
          this.Response.ErrorDetails![_ExceptionMessageKey];
      String? stackTrace = this.Response.ErrorDetails![_StackTraceKey];

//                        return StringUtils.Format(
//                            Strings.ServerErrorAndStackTraceDetails,
//                            this.Response.ErrorMessage,
//                            exceptionClass,
//                            exceptionMessage,
//                            stackTrace);
      return "${this._response.ErrorMessage} -- Server Error: $exceptionClass: $exceptionMessage $stackTrace";
    }
  }

  return this.Response.ErrorMessage;
}