Commit 5f319762 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 7f72b67b
......@@ -21,7 +21,7 @@ import (
// error type which is raised by raise(arg)
type Error struct {
arg interface{}
link *Error
link *Error // chain of linked Error(s) - see erraddcontext()
}
func (e *Error) Error() string {
......@@ -81,7 +81,7 @@ func errcatch(f func (e *Error)) {
f(e)
}
// hook into unwidnign process with f() call. Returned error is reraised.
// hook into unwinding process with f() call. Returned error is reraised.
// see also: erraddcontext()
// must be called under defer
func erronunwind(f func(e *Error) *Error) {
......@@ -104,7 +104,7 @@ func errlinkerror(e *Error, arg interface{}) *Error {
*/
// f is called if error unwining is happenning.
// f is called if error unwinding is happening.
// call result is added to raised error as "prefix" context
func erraddcontext(f func() interface{}) {
e := _errcatch(recover())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment