@@ -11,13 +11,13 @@ type InvalidUnmarshalError struct {
1111
1212func (e * InvalidUnmarshalError ) Error () string {
1313 if e .Type == nil {
14- return "php: Unmarshal(nil)"
14+ return "php-serialize : Unmarshal(nil)"
1515 }
1616
1717 if e .Type .Kind () != reflect .Ptr {
18- return fmt .Sprintf ("php: Unmarshal(non-pointer %s)" , e .Type )
18+ return fmt .Sprintf ("php-serialize : Unmarshal(non-pointer %s)" , e .Type )
1919 }
20- return fmt .Sprintf ("php: Unmarshal(nil %s)" , e .Type )
20+ return fmt .Sprintf ("php-serialize : Unmarshal(nil %s)" , e .Type )
2121}
2222
2323// A SyntaxError is a description of a JSON syntax error.
@@ -40,11 +40,11 @@ type UnmarshalTypeError struct {
4040
4141func (e * UnmarshalTypeError ) Error () string {
4242 if e .Struct != "" || e .Field != "" {
43- return fmt .Sprintf ("php: cannot unmarshal %s into Go struct field %s.%s of type %s (offset %d)" ,
43+ return fmt .Sprintf ("php-serialize : cannot unmarshal %s into Go struct field %s.%s of type %s (offset %d)" ,
4444 e .Value , e .Struct , e .Field , e .Type , e .Offset ,
4545 )
4646 }
47- return fmt .Sprintf ("php: cannot unmarshal %s into Go value of type %s (offset: %d)" , e .Value , e .Type , e .Offset )
47+ return fmt .Sprintf ("php-serialize : cannot unmarshal %s into Go value of type %s (offset: %d)" , e .Value , e .Type , e .Offset )
4848}
4949
5050// An UnsupportedTypeError is returned by Marshal when attempting
@@ -54,7 +54,7 @@ type UnsupportedTypeError struct {
5454}
5555
5656func (e * UnsupportedTypeError ) Error () string {
57- return fmt .Sprintf ("php: unsupported type: %s" , e .Type )
57+ return fmt .Sprintf ("php-serialize : unsupported type: %s" , e .Type )
5858}
5959
6060type UnsupportedValueError struct {
@@ -63,7 +63,7 @@ type UnsupportedValueError struct {
6363}
6464
6565func (e * UnsupportedValueError ) Error () string {
66- return fmt .Sprintf ("php: unsupported value: %s" , e .Str )
66+ return fmt .Sprintf ("php-serialize : unsupported value: %s" , e .Str )
6767}
6868
6969func ErrSyntax (msg string , offset int64 ) * SyntaxError {
@@ -72,52 +72,52 @@ func ErrSyntax(msg string, offset int64) *SyntaxError {
7272
7373func ErrExceededMaxDepth (c byte , cursor int64 ) * SyntaxError {
7474 return & SyntaxError {
75- msg : fmt .Sprintf (`invalid character "%c" exceeded max depth` , c ),
75+ msg : fmt .Sprintf (`php-serialize: invalid character "%c" exceeded max depth` , c ),
7676 Offset : cursor ,
7777 }
7878}
7979
8080func ErrUnexpectedStart (typ string , buf []byte , cursor int64 ) * SyntaxError {
8181 return & SyntaxError {
82- msg : fmt .Sprintf ("php: unexpected %c at beginning of %s" , buf [cursor ], typ ),
82+ msg : fmt .Sprintf ("php-serialize : unexpected %c at beginning of %s" , buf [cursor ], typ ),
8383 Offset : cursor ,
8484 }
8585}
8686
8787func ErrUnexpectedEnd (msg string , cursor int64 ) * SyntaxError {
8888 return & SyntaxError {
89- msg : fmt .Sprintf ("php: %s unexpected end of input" , msg ),
89+ msg : fmt .Sprintf ("php-serialize : %s unexpected end of input" , msg ),
9090 Offset : cursor ,
9191 }
9292}
9393
9494func ErrUnexpected (msg string , cursor int64 , c byte ) * SyntaxError {
95- return & SyntaxError {msg : fmt .Sprintf ("php: expecting %s, get char '%c' instead" , msg , c ), Offset : cursor }
95+ return & SyntaxError {msg : fmt .Sprintf ("php-serialize : expecting %s, get char '%c' instead" , msg , c ), Offset : cursor }
9696}
9797
9898func ErrInvalidCharacter (c byte , context string , cursor int64 ) * SyntaxError {
9999 if c == 0 {
100100 return & SyntaxError {
101- msg : fmt .Sprintf ("php: invalid character as %s" , context ),
101+ msg : fmt .Sprintf ("php-serialize : invalid character as %s" , context ),
102102 Offset : cursor ,
103103 }
104104 }
105105 return & SyntaxError {
106- msg : fmt .Sprintf ("php: invalid character %c as %s" , c , context ),
106+ msg : fmt .Sprintf ("php-serialize : invalid character %c as %s" , c , context ),
107107 Offset : cursor ,
108108 }
109109}
110110
111111func ErrInvalidBeginningOfValue (c byte , cursor int64 ) * SyntaxError {
112112 return & SyntaxError {
113- msg : fmt .Sprintf ("invalid character '%c' looking for beginning of value" , c ),
113+ msg : fmt .Sprintf ("php-serialize: invalid character '%c' looking for beginning of value" , c ),
114114 Offset : cursor ,
115115 }
116116}
117117
118118func ErrInvalidBeginningOfArray (c byte , cursor int64 ) * SyntaxError {
119119 return & SyntaxError {
120- msg : fmt .Sprintf ("invalid character '%c' looking for beginning of array" , c ),
120+ msg : fmt .Sprintf ("php-serialize: invalid character '%c' looking for beginning of array" , c ),
121121 Offset : cursor ,
122122 }
123123}
@@ -135,5 +135,5 @@ type overflowError struct {
135135}
136136
137137func (o overflowError ) Error () string {
138- return fmt .Sprintf ("php: %v overflow type %s" , o .v , o .t )
138+ return fmt .Sprintf ("php-serialize : %v overflow type %s" , o .v , o .t )
139139}
0 commit comments