Added validation and error handling
BETA READY
This commit is contained in:
parent
e319326c30
commit
b9314ac678
7 changed files with 42 additions and 34 deletions
|
|
@ -40,5 +40,10 @@ namespace FileLiberator
|
|||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<StatusHandler> TryProcessAsync(this IProcessable processable, LibraryBook libraryBook)
|
||||
=> await processable.ValidateAsync(libraryBook)
|
||||
? await processable.ProcessAsync(libraryBook)
|
||||
: new StatusHandler();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue