agerrors

package
v2.13.1 Latest Latest
Warning

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

Go to latest
Published: May 5, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package agerrors has error types for api_gen

Package agerrors has error types for api_gen

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewParserError

func NewParserError(file string, line int, message string) error

NewParserError initializes a new ParserError

func UnwrapFormattedRunE

func UnwrapFormattedRunE(fn func(cmd *cobra.Command, args []string) error) func(cmd *cobra.Command, args []string) error

UnwrapFormattedRunE wraps RunE and if returned error coontains Formatted, it will be returned

Types

type Formatted

type Formatted interface {
	error
	Formatted() string
}

Formatted is a formatted error representation which is printed directly

type ParserError

type ParserError struct {
	File    string
	Line    int
	Message string
}

ParserError represents an error occurred in parser

func (*ParserError) Error

func (e *ParserError) Error() string

Error is for error interface

func (*ParserError) Formatted

func (e *ParserError) Formatted() string

Formatted is for Formatted interface

Jump to

Keyboard shortcuts

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