case 4586 - got to build point without error all dependencies updated but reporting error handling work to be done and not tested at all yet
This commit is contained in:
@@ -11,6 +11,7 @@ using EnumsNET;
|
|||||||
using PuppeteerSharp;
|
using PuppeteerSharp;
|
||||||
using Newtonsoft.Json.Linq;
|
using Newtonsoft.Json.Linq;
|
||||||
using System;
|
using System;
|
||||||
|
using StackExchange.Profiling.Internal;
|
||||||
|
|
||||||
namespace AyaNova.Biz
|
namespace AyaNova.Biz
|
||||||
{
|
{
|
||||||
@@ -570,7 +571,8 @@ namespace AyaNova.Biz
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
log.LogDebug($"Windows: Calling browserFetcher download async now:");
|
log.LogDebug($"Windows: Calling browserFetcher download async now:");
|
||||||
await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
|
//await new BrowserFetcher().DownloadAsync(BrowserFetcher.DefaultChromiumRevision);
|
||||||
|
await new BrowserFetcher(SupportedBrowser.Chromium).DownloadAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -611,15 +613,20 @@ namespace AyaNova.Biz
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
//info and error logging
|
//info and error logging
|
||||||
page.Console += async (sender, args) =>
|
//case 4586 not calling task whenall now means non async so this page.Console += async (sender, args) => is now this:
|
||||||
|
page.Console += (sender, args) =>
|
||||||
{
|
{
|
||||||
switch (args.Message.Type)
|
switch (args.Message.Type)
|
||||||
{
|
{
|
||||||
case ConsoleType.Error:
|
case ConsoleType.Error:
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var errorArgs = await Task.WhenAll(args.Message.Args.Select(arg => arg.ExecutionContext.EvaluateFunctionAsync("(arg) => arg instanceof Error ? arg.message : arg", arg)));
|
|
||||||
PageLog.AppendLine($"ERROR: {args.Message.Text} args: [{string.Join<object>(", ", errorArgs)}]");
|
//case 4586 todo force an error here and see what we can do with it old vs new behaviour test on current release same report with erorr triggered
|
||||||
|
PageLog.AppendLine($"ERROR: {args.Message.Text}");
|
||||||
|
//case 4586 this no longer works due to no executioncontext in arg in teh block below
|
||||||
|
// var errorArgs = await Task.WhenAll(args.Message.Args.Select(arg => arg.ExecutionContext.EvaluateFunctionAsync("(arg) => arg instanceof Error ? arg.message : arg", arg)));
|
||||||
|
// PageLog.AppendLine($"ERROR: {args.Message.Text} args: [{string.Join<object>(", ", errorArgs)}]");
|
||||||
}
|
}
|
||||||
catch { }
|
catch { }
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user