gopp/errors.go

16 lines
208 B
Go
Raw Normal View History

package gopp
2024-02-26 00:22:09 +03:00
import (
//"errors"
"fmt"
)
type UnexpectedError struct {
What string
Line int
}
func (err UnexpectedError) Error() string {
return fmt.Sprintf("%d: unexpected %s", err.Line, err.What)
}