Error.cshtml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. @using Abp.Collections.Extensions
  2. @using Abp.Extensions
  3. @model Abp.Web.Mvc.Models.ErrorViewModel
  4. @{
  5. ViewBag.DisableTenantChange = true;
  6. var errorMessage = Model.ErrorInfo.Message;
  7. var errorDetails = Model.ErrorInfo.Details;
  8. if (errorDetails.IsNullOrEmpty())
  9. {
  10. errorDetails = errorMessage;
  11. errorMessage = L("Error");
  12. }
  13. }
  14. <div class="container d-flex flex-row-fluid flex-column justify-content-md-center p-12">
  15. <h1 class="error-title font-weight-boldest text-info mt-10 mt-md-0 mb-12">
  16. @errorMessage
  17. </h1>
  18. <p class="font-weight-boldest display-4">
  19. @errorDetails
  20. </p>
  21. <p class="font-size-h3">
  22. @* Show validation errors *@
  23. @if (!Model.ErrorInfo.ValidationErrors.IsNullOrEmpty())
  24. {
  25. foreach (var validationError in Model.ErrorInfo.ValidationErrors)
  26. {
  27. <text>* </text>
  28. @(validationError.Message)
  29. if (validationError.Members != null && validationError.Members.Any())
  30. {
  31. <text>(@string.Join(", ", validationError.Members))</text>
  32. }
  33. <br/>
  34. }
  35. }
  36. </p>
  37. </div>