errors

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2019 License: MPL-2.0 Imports: 4 Imported by: 3 modules, 25 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoAPIKeyMessage = `

` + wordwrap.WrapString("Running `fossa analyze` performs a dependency analysis and uploads the result to FOSSA. To run an analysis without uploading results, run:", width) + `
    
    ` + color.HiGreenString("fossa analyze --output") + `

` + wordwrap.WrapString("You can provide your API key by setting the $FOSSA_API_KEY environment variable. For example, try running:", width) + `
    
    ` + color.HiGreenString("FOSSA_API_KEY=<YOUR_API_KEY_HERE> $command") + `

` + wordwrap.WrapString("You can create an API key for your FOSSA account at:", width) + `
    
    ` + color.HiBlueString("$endpoint/account/settings/integrations/api_tokens") + `
`
View Source
var NotImplementedMessage = `This code path has not yet been implemented.`
View Source
var ReportBugMessage = `

` + color.HiYellowString("REPORTING A BUG:") + `
` + wordwrap.WrapString("Please try troubleshooting before filing a bug. If the suggestions do not help you can file a bug at "+color.HiBlueString("https://github.com/fossas/fossa-cli/issues/new")+".", width) + `
` + wordwrap.WrapString("Please attach the debug logs from:", width) + `
  
  ` + color.HiGreenString("fossa <cmd> --debug") + `
  
` + wordwrap.WrapString("For additional support, contact "+color.MagentaString("support@fossa.com")+".", width)

Functions

func Errorf added in v0.7.34

func Errorf(format string, args ...interface{}) error

func New

func New(msg string) error

func Wrap

func Wrap(cause error, msg string) error

func Wrapf

func Wrapf(cause error, format string, args ...interface{}) error

Types

type Error

type Error struct {
	ExitCode        int
	Cause           error  // Base error.
	Type            Type   // Type helps us tell the user to log an issue, go to docs, etc.
	Message         string // Help message for the user, contact support, opening an issue, etc.
	Troubleshooting string // Simple solution or debugging instructions.
	Link            string // Link to documentation or reference information.
}

Error is the fossa implementation of errors for providing user-friendly information.

func NotImplementedError added in v1.0.0

func NotImplementedError() *Error

NotImplemented should be used to signify that a code path is not yet implemented.

func UnknownError added in v0.7.34

func UnknownError(err error, message string) *Error

UnknownError creates a simple fossa error using an existing error and additional context.

func WrapError

func WrapError(cause error, err Error) Error

func (*Error) Error

func (e *Error) Error() string

type Type added in v0.7.34

type Type = int
const (
	User Type = iota
	Exec
	Unknown
	NotImplemented
)

Jump to

Keyboard shortcuts

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