Should application logging code always be in catch block?
Is it better for instance to check is object null in try block and if so log the exception or catch nullreference exception and log error(warning)
Should application logging code always be in catch block? Is it better for instance
Share
catchblocks should log, but that should definitely not be the only place you do logging.*I’m sure there’s some edge-case scenario where this isn’t true, but it’s quite rare.