File tree Expand file tree Collapse file tree 3 files changed +6
-296
lines changed Expand file tree Collapse file tree 3 files changed +6
-296
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -348,7 +348,7 @@ public void _when_promise1_is_rejected_with_no_value_in_catch()
348348
349349 new Promise < object > ( ( res , rej ) => rej ( new Exception ( ) ) )
350350 . Catch ( _ => { } )
351- . Then ( ( ) => callbackInvoked = true ) ;
351+ . Then ( ( x ) => callbackInvoked = true ) ;
352352
353353 Assert . True ( callbackInvoked ) ;
354354 }
Original file line number Diff line number Diff line change 1- using RSG . Promises ;
1+ using RSG . Promises ;
22using System ;
33using System . Collections . Generic ;
44using System . Linq ;
@@ -427,19 +427,19 @@ IPromiseBase IPromiseBase.WithName(string name)
427427 /// <summary>
428428 /// Handle errors for the promise.
429429 /// </summary>
430- public IPromise Catch ( Action < Exception > onRejected )
430+ public IPromise < PromisedT > Catch ( Action < Exception > onRejected )
431431 {
432- var resultPromise = new Promise ( ) ;
432+ var resultPromise = new Promise < PromisedT > ( ) ;
433433 resultPromise . WithName ( Name ) ;
434434
435- Action < PromisedT > resolveHandler = _ => resultPromise . Resolve ( ) ;
435+ Action < PromisedT > resolveHandler = _ => resultPromise . Resolve ( default ( PromisedT ) ) ;
436436
437437 Action < Exception > rejectHandler = ex =>
438438 {
439439 try
440440 {
441441 onRejected ( ex ) ;
442- resultPromise . Resolve ( ) ;
442+ resultPromise . Resolve ( default ( PromisedT ) ) ;
443443 }
444444 catch ( Exception cbEx )
445445 {
You can’t perform that action at this time.
0 commit comments