Browse Source

Okay, the actual underlying mistake was pretty stupid, which made it

difficult to catch. This commit simplifies the solution.

What happened is that, for some idiotic reason, I was checking the type
of c.lastError, which was the previously set error for the context. This
was in place of doing the correct (read: smart) thing, which would have
been to check the type of the INCOMING error.

I'm not completely sure why I made this mistake, whether it was based
off of a previous incantation of SetError(), or because of some nested
dependencies that existed in a few ancient revisions, but it was still
something that should never have happened.
template-theme-rewrite
Benjamin Shelton 8 months ago
parent
commit
a8a02abed3
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      context.go

+ 1
- 2
context.go View File

@ -578,8 +578,7 @@ func (c *capstanContext) Error() string {
// SetError changes the value of lastError for this context.
func (c *capstanContext) SetError(err error) {
switch err.(type) {
case Context:
if _, ok := err.(Context); ok {
return
}
c.lastError = err


Loading…
Cancel
Save