Internal helper function to create new baseError objects, note that if there is more than one level of redirection to call this function, stack frame information will include that level too.
(err error, msg string)
| 152 | // note that if there is more than one level of redirection to call this function, |
| 153 | // stack frame information will include that level too. |
| 154 | func newBaseError(err error, msg string) *baseError { |
| 155 | var stackBuf [200]uintptr |
| 156 | stackLength := runtime.Callers(3, stackBuf[:]) |
| 157 | stack := make([]uintptr, stackLength) |
| 158 | copy(stack, stackBuf[:stackLength]) |
| 159 | return &baseError{ |
| 160 | msg: msg, |
| 161 | stack: stack, |
| 162 | inner: err, |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // Constructs full error message for a given DropboxError by traversing |
| 167 | // all of its inner errors. If includeStack is True it will also include |