Skip to content

More Beautiful and Better way to show Errors to Users

License

Notifications You must be signed in to change notification settings

9dl/BetterErrors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BetterErrors

Overview

BetterErrors is a GoLang package that provides a more beautiful and effective way to handle and display errors in your applications. It includes functions for logging detailed error information, recovering from panics, and printing general user information.

Features

  • LogError: Log detailed error information with runtime details.
  • RecoverFromPanic: Recover from panics and log panic details.
  • PrintInfo: Print general information about the user.

Usage

Installation

go get -u github.com/9dl/BetterErrors

Example

package main

var logger = BetterErrors.NewErrorLogger()

import (
	"errors"
	"github.com/9dl/BetterErrors"
)

func main() {
	logger.SetIncludeSensitiveInfo(true)
	someFunction()
	// ... rest of your code ...
}

func someFunction()  {
	logger.LogError(errors.New("Hello!"))
}

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

More Beautiful and Better way to show Errors to Users

Topics

Resources

License

Stars

Watchers

Forks

Languages