4 ms·
panics != errors that person is talking about application level error handling. In most cases if a functions panics generally the caller isn't expected to do a
by avl999 5y ago
panics != errors
that person is talking about application level error handling. In most cases if a functions panics generally the caller isn't expected to do anything about it other than perhaps have a panic handler at the top level of the app that logs things and lets it crash. So in general you don't need to think about catching or handling panics in most of your application code. It is the equivalent of a method that you are calling from your java code returning an undocumented NPE.