File tree Expand file tree Collapse file tree
Source/BlazorState/Pipeline/CloneState
Features/Application/Notification Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ RequestHandlerDelegate<TResponse> aNext
7575 // Maybe if error occurs on one action we want to launch another action to
7676 // Update some error state so the user knows of the failure.
7777 // But as a rule if this is an exception it should be unexpected.
78- Logger . LogError ( $ "{ className } : Error: { aException . Message } ") ;
79- Logger . LogError ( $ "{ className } : InnerError: { aException ? . InnerException ? . Message } ") ;
80- Logger . LogError ( $ "{ className } : Restoring State of type: { declaringType } ") ;
78+ Logger . LogWarning ( $ "{ className } : Error: { aException . Message } ") ;
79+ Logger . LogWarning ( $ "{ className } : InnerError: { aException ? . InnerException ? . Message } ") ;
80+ Logger . LogWarning ( $ "{ className } : Restoring State of type: { declaringType } ") ;
8181
8282 if ( ! IsApiCallException ( aException ) && originalState != null )
8383 {
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public Task Handle
3232 CancellationToken aCancellationToken
3333 )
3434 {
35- // Logger.LogDebug( aExceptionNotification.Request.GetType().Name );
35+ Logger . LogWarning ( $ " aExceptionNotification.Exception.Message: { aExceptionNotification . Exception . Message } " ) ;
3636 ApplicationState . ExceptionMessage = aExceptionNotification . Exception . Message ;
3737 return Unit . Task ;
3838 }
Original file line number Diff line number Diff line change 1717<br />
1818<hr />
1919<h6 >Click below to send a Change Route Request that should take back to home page.</h6 >
20- <button class =" btn btn-primary" data-qa =" ChangeRoute" @onclick =" ButtonClick " >Change Route to Home</button >
20+ <button class =" btn btn-primary" data-qa =" ChangeRoute" @onclick =ChangeRouteToHome >Change Route to Home</button >
2121
2222<br />
2323<hr />
2424<h6 >Click below to send a IncrementCountAction via JsInterop.</h6 >
2525<button class =" btn btn-primary" data-qa =" JsInterop" onclick =" window.InteropTest()" >Increment Count by 7 via JavaScript Interop</button >
2626
27+ <br />
28+ <hr />
29+ <h6 >Click below to Throw and exception that will roll back state.</h6 >
30+ <button class =" btn btn-primary" data-qa =" ThrowException" @onclick =SendThrowExceptionAction >Send Throw Exception Action</button >
31+
2732<br />
2833<hr />
2934<h6 >EventStream is an example of middleware. It adds each action to list.</h6 >
Original file line number Diff line number Diff line change @@ -3,10 +3,14 @@ namespace TestApp.Client.Pages
33 using BlazorState . Features . Routing ;
44 using System . Threading . Tasks ;
55 using TestApp . Client . Features . Base . Components ;
6+ using static TestApp . Client . Features . Counter . CounterState ;
67
78 public class CounterPageBase : BaseComponent
89 {
9- protected async Task ButtonClick ( ) =>
10- _ = await Mediator . Send ( new RouteState . ChangeRouteAction { NewRoute = "/" } ) ;
10+ protected async Task ChangeRouteToHome ( ) =>
11+ await Mediator . Send ( new RouteState . ChangeRouteAction { NewRoute = "/" } ) ;
12+
13+ protected async Task SendThrowExceptionAction ( ) =>
14+ await Mediator . Send ( new ThrowExceptionAction ( ) ) ;
1115 }
1216}
Original file line number Diff line number Diff line change 11{
22 "sdk" : {
3- "version" : " 3.1.402 " ,
3+ "version" : " 3.1.404 " ,
44 "rollForward" : " latestFeature"
55 }
66}
You can’t perform that action at this time.
0 commit comments