2022-11-25 18:19:33 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022 tursom. All rights reserved.
|
|
|
|
* Use of this source code is governed by a GPL-3
|
|
|
|
* license that can be found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
2021-07-06 14:32:01 +08:00
|
|
|
package exceptions
|
|
|
|
|
2022-03-31 01:22:30 +08:00
|
|
|
import (
|
2022-11-26 14:05:48 +08:00
|
|
|
"github.com/tursom/GoCollections/lang"
|
2022-03-31 01:22:30 +08:00
|
|
|
)
|
|
|
|
|
2022-11-26 14:05:48 +08:00
|
|
|
type PackageException = lang.PackageException
|
2021-07-06 14:32:01 +08:00
|
|
|
|
2022-03-31 01:22:30 +08:00
|
|
|
func NewPackageException(err any, config *ExceptionConfig) *PackageException {
|
2022-11-26 14:05:48 +08:00
|
|
|
return lang.NewPackageException(err, config.AddSkipStack(1))
|
2021-07-06 14:32:01 +08:00
|
|
|
}
|
2022-03-23 10:15:18 +08:00
|
|
|
func UnpackException(err any) any {
|
2022-11-26 14:05:48 +08:00
|
|
|
return lang.UnpackException(err)
|
2021-07-06 14:32:01 +08:00
|
|
|
}
|