I wanted to handle a file loading error in a consumer of an RxSwift Observable sequence. But if the sequence itself produces an .error
event, it completes. After fiddling around for a while, I decided to simply use the Result
enum and ended up with Observable<Result<Theme, ThemeError>>
.
Continue reading …
I am using SwiftyBeaver in TableFlip and my latest project. Doing some robust console and file logging is important, and this library seems to work just fine for my needs. Except for error reporting. I do not want to attach the whole debug log when folks may report a simple problem. So I figured: maybe it’ll help to have the last 5 or 10 log messages attached upon a first error encounter.
Continue reading …