mirror of
https://github.com/unidoc/unipdf.git
synced 2025-04-29 13:48:54 +08:00
12 lines
1.5 KiB
Go
12 lines
1.5 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";type processError struct{_eg string ;_f string ;_g string ;_ff error ;};func Errorf (processName ,message string ,arguments ...interface{})error {return _a (_ef .Sprintf (message ,arguments ...),processName );};func (_c *processError )Error ()string {var _b string ;if _c ._eg !=""{_b =_c ._eg ;};_b +="\u0050r\u006f\u0063\u0065\u0073\u0073\u003a "+_c ._f ;if _c ._g !=""{_b +="\u0020\u004d\u0065\u0073\u0073\u0061\u0067\u0065\u003a\u0020"+_c ._g ;};if _c ._ff !=nil {_b +="\u002e\u0020"+_c ._ff .Error ();};return _b ;};func Wrap (err error ,processName ,message string )error {if _fa ,_ec :=err .(*processError );_ec {_fa ._eg ="";};_cf :=_a (message ,processName );_cf ._ff =err ;return _cf ;};func _a (_ae ,_af string )*processError {return &processError {_eg :"\u005b\u0055\u006e\u0069\u0050\u0044\u0046\u005d",_g :_ae ,_f :_af };};func Wrapf (err error ,processName ,message string ,arguments ...interface{})error {if _gc ,_fd :=err .(*processError );_fd {_gc ._eg ="";};_ag :=_a (_ef .Sprintf (message ,arguments ...),processName );_ag ._ff =err ;return _ag ;};func Error (processName ,message string )error {return _a (message ,processName )}; |