16 lines
206 B
Go
16 lines
206 B
Go
|
package pp
|
||
|
|
||
|
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)
|
||
|
}
|
||
|
|