mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
add error code feature for package gerror
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
// Copyright 2019 gf Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
// Copyright GoFrame Author(https://github.com/gogf/gf). All Rights Reserved.
|
||||
//
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file,
|
||||
@ -12,13 +12,13 @@ import "runtime"
|
||||
type stack []uintptr
|
||||
|
||||
const (
|
||||
gMAX_STACK_DEPTH = 32
|
||||
maxStackDepth = 32
|
||||
)
|
||||
|
||||
// callers returns the stack callers.
|
||||
func callers(skip ...int) stack {
|
||||
var (
|
||||
pcs [gMAX_STACK_DEPTH]uintptr
|
||||
pcs [maxStackDepth]uintptr
|
||||
n = 3
|
||||
)
|
||||
if len(skip) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user