Unify error messages
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
package atom
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
import "fmt"
|
||||
|
||||
type XHTMLText struct {
|
||||
*CommonAttributes
|
||||
@@ -18,7 +15,7 @@ func (x *XHTMLText) isText() bool { return true }
|
||||
// error.
|
||||
func (x *XHTMLText) Check() error {
|
||||
if x.Type != "xhtml" {
|
||||
return errors.New("type attribute of xhtml text must be xhtml")
|
||||
return fmt.Errorf("type attribute of xhtml text %v must be xhtml", x)
|
||||
}
|
||||
|
||||
if err := x.XHTMLDiv.Check(); err != nil {
|
||||
|
Reference in New Issue
Block a user