logoalt Hacker News

deepsuntoday at 1:05 PM2 repliesview on HN

I hate when tools only produce generic "TLS Handshake failed" instead of saying why exactly it failed, where is the problem.


Replies

kitdtoday at 1:27 PM

This is the kind of scenario that is served better by Go/C-style error values than exceptions. Error values facilitate and encourage you to log what you were doing at the precise point when an error occurs. Doing the same with exceptions idiomatically often requires an exception hierarchy or copious amounts of separate try/catches.

The difference really becomes apparent when trying to debug a customer's problem at 3am (IME).

thunkytoday at 1:10 PM

Sounds like you'd both be happy if the tool produced both.

show 2 replies