utils

package
v1.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CatchPanic

func CatchPanic(ctx context.Context)

CatchPanic prevents a panic from escaping and allows us to log an error for it. This is helpful to keep track of async goroutines that do not return anything to the main app thread. We want to catch the panic and log an error in these cases and want to prevent them from crashing the app. Ideally this is used in a debugging process that leads to the resolution of the panic case.

func LogPanic added in v1.3.2

func LogPanic(ctx context.Context)

LogPanic produces an error log to record the issue and repanics to allow the app to crash. This is helpful to get a definitive error log before the uncaught panic crashes the app. Ideally this is used in a debugging process that leads to the resolution of the panic case.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL