mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
remove controller feature from package ghttp
This commit is contained in:
@ -8,13 +8,14 @@ package gerror
|
||||
|
||||
// Option is option for creating error.
|
||||
type Option struct {
|
||||
Error error // Wrapped error.
|
||||
Stack bool // Record stack information into error.
|
||||
Error error // Wrapped error if any.
|
||||
Stack bool // Whether recording stack information into error.
|
||||
Text string // Error text, which is created by New* functions.
|
||||
Code int // Error code if necessary.
|
||||
}
|
||||
|
||||
// NewOption creates and returns an error with Option.
|
||||
// It is the senior usage for creating error, which is often used internally in framework.
|
||||
func NewOption(option Option) error {
|
||||
err := &Error{
|
||||
error: option.Error,
|
||||
|
||||
Reference in New Issue
Block a user