mirror of
https://github.com/unidoc/unipdf.git
synced 2025-05-04 22:17:22 +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 (_e "fmt";_d "golang.org/x/xerrors";);type processError struct{_fa string ;_dg string ;_be string ;_fd error ;};func _g (_gb ,_bd string )*processError {return &processError {_fa :"\u005b\u0055\u006e\u0069\u0050\u0044\u0046\u005d",_be :_gb ,_dg :_bd };
|
|
};func Error (processName ,message string )error {return _g (message ,processName )};func (_a *processError )Error ()string {var _ae string ;if _a ._fa !=""{_ae =_a ._fa ;};_ae +="\u0050r\u006f\u0063\u0065\u0073\u0073\u003a "+_a ._dg ;if _a ._be !=""{_ae +="\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u003a\u0020"+_a ._be ;
|
|
};if _a ._fd !=nil {_ae +="\u002e\u0020"+_a ._fd .Error ();};return _ae ;};func (_ff *processError )Unwrap ()error {return _ff ._fd };var _ _d .Wrapper =(*processError )(nil );func Wrap (err error ,processName ,message string )error {if _eg ,_ed :=err .(*processError );
|
|
_ed {_eg ._fa ="";};_bf :=_g (message ,processName );_bf ._fd =err ;return _bf ;};func Errorf (processName ,message string ,arguments ...interface{})error {return _g (_e .Sprintf (message ,arguments ...),processName );};func Wrapf (err error ,processName ,message string ,arguments ...interface{})error {if _c ,_ad :=err .(*processError );
|
|
_ad {_c ._fa ="";};_ba :=_g (_e .Sprintf (message ,arguments ...),processName );_ba ._fd =err ;return _ba ;}; |