Implemented invalid character checks
This commit is contained in:
13
src/errors/InvalidCharacter.go
Normal file
13
src/errors/InvalidCharacter.go
Normal file
@ -0,0 +1,13 @@
|
||||
package errors
|
||||
|
||||
import "fmt"
|
||||
|
||||
// InvalidCharacter error is created when an invalid character appears.
|
||||
type InvalidCharacter struct {
|
||||
Character string
|
||||
}
|
||||
|
||||
// Error generates the string representation.
|
||||
func (err *InvalidCharacter) Error() string {
|
||||
return fmt.Sprintf("Invalid character '%s'", err.Character)
|
||||
}
|
Reference in New Issue
Block a user