toMessage method

  1. @override
String toMessage()
override

Implementation

@override
String toMessage() {
  switch (code) {
    case UploadAttachmentErrorCode.malformed:
      return 'err_uploaded_file_malformed'.l10n;
    case UploadAttachmentErrorCode.noFilename:
      return 'err_no_filename'.l10n;
    case UploadAttachmentErrorCode.invalidSize:
      return 'err_size_too_big'.l10n;
    case UploadAttachmentErrorCode.invalidDimensions:
      return 'err_dimensions_too_big'.l10n;
    case UploadAttachmentErrorCode.artemisUnknown:
      return 'err_unknown'.l10n;
  }
}