mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-05 19:30:30 +08:00
16 lines
1.7 KiB
Go
16 lines
1.7 KiB
Go
//
|
|
// Copyright 2020 FoxyUtils ehf. All rights reserved.
|
|
//
|
|
// This is a commercial product and requires a license to operate.
|
|
// A trial license can be obtained at https://unidoc.io
|
|
//
|
|
// DO NOT EDIT: generated by unitwist Go source code obfuscator.
|
|
//
|
|
// Use of this source code is governed by the UniDoc End User License Agreement
|
|
// terms that can be accessed at https://unidoc.io/eula/
|
|
|
|
package errors ;import (_ef "fmt";_d "golang.org/x/xerrors";);func Wrapf (err error ,processName ,message string ,arguments ...interface{})error {if _ag ,_agg :=err .(*processError );_agg {_ag ._b ="";};_gg :=_bd (_ef .Sprintf (message ,arguments ...),processName );
|
|
_gg ._bf =err ;return _gg ;};type processError struct{_b string ;_f string ;_g string ;_bf error ;};func Errorf (processName ,message string ,arguments ...interface{})error {return _bd (_ef .Sprintf (message ,arguments ...),processName );};var _ _d .Wrapper =(*processError )(nil );
|
|
func _bd (_de ,_ee string )*processError {return &processError {_b :"\u005b\u0055\u006e\u0069\u0050\u0044\u0046\u005d",_g :_de ,_f :_ee };};func (_gf *processError )Error ()string {var _c string ;if _gf ._b !=""{_c =_gf ._b ;};_c +="\u0050r\u006f\u0063\u0065\u0073\u0073\u003a "+_gf ._f ;
|
|
if _gf ._g !=""{_c +="\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u003a\u0020"+_gf ._g ;};if _gf ._bf !=nil {_c +="\u002e\u0020"+_gf ._bf .Error ();};return _c ;};func (_ec *processError )Unwrap ()error {return _ec ._bf };func Wrap (err error ,processName ,message string )error {if _dc ,_dce :=err .(*processError );
|
|
_dce {_dc ._b ="";};_ac :=_bd (message ,processName );_ac ._bf =err ;return _ac ;};func Error (processName ,message string )error {return _bd (message ,processName )}; |