Browse Source
Merge pull request #20543 from abpframework/docpatch
Add Url to DocumentRenderErrorEvent
dgnyldrm7-patch-1
Gizem Mutu Kurt
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
10 additions and
1 deletions
-
modules/docs/src/Volo.Docs.Domain.Shared/Volo/Docs/Documents/DocumentRenderErrorEvent.cs
-
modules/docs/src/Volo.Docs.Web/Pages/Documents/Project/Index.cshtml.cs
|
|
|
@ -1,3 +1,5 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
namespace Volo.Docs.Documents; |
|
|
|
|
|
|
|
public class DocumentRenderErrorEvent |
|
|
|
@ -5,4 +7,8 @@ public class DocumentRenderErrorEvent |
|
|
|
public string Name { get; set; } |
|
|
|
|
|
|
|
public string ErrorMessage { get; set; } |
|
|
|
|
|
|
|
public string Url { get; set; } |
|
|
|
|
|
|
|
public Dictionary<string, string> UserPreferences { get; set; } |
|
|
|
} |
|
|
|
@ -590,7 +590,10 @@ namespace Volo.Docs.Pages.Documents.Project |
|
|
|
Document.Content = $"````txt{Environment.NewLine}{message}{Environment.NewLine}````"; |
|
|
|
await LocalEventBus.PublishAsync(new DocumentRenderErrorEvent |
|
|
|
{ |
|
|
|
ErrorMessage = message, Name = Document.Name |
|
|
|
ErrorMessage = e.Message, |
|
|
|
Name = Document.Name, |
|
|
|
Url = Request.GetDisplayUrl(), |
|
|
|
UserPreferences = UserPreferences |
|
|
|
}); |
|
|
|
|
|
|
|
// Slow down with crawling
|
|
|
|
|