errors.go 208 B

123456789101112131415
  1. package gopp
  2. import (
  3. //"errors"
  4. "fmt"
  5. )
  6. type UnexpectedError struct {
  7. What string
  8. Line int
  9. }
  10. func (err UnexpectedError) Error() string {
  11. return fmt.Sprintf("%d: unexpected %s", err.Line, err.What)
  12. }