News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by bogdanoff_2 on Monday February 03, 2020 @12:14PM (#22226258)
For the readAllText example, could it return Result<string, Exception>?
Re:You’re better off using Exceptions by xeonoex on Monday February 03, 2020 @01:49PM (#22227499)
Yes, but you can still argue just throwing it might be better. This also affects the stack trace, because, at least in C# (so probably F#) `throw ex;` is different than `throw;`, which rethrows the exception as if it weren't caught.