009d27b081
Here I also add forCode(ErrorCode) method with the same goal - keep all the knowledge about one issue in one place. Producers already have to know which error they handle, because the have expectations about the target node. R=brianwilkerson@google.com, pquitslund@google.com Change-Id: I584521b3a6e79cc126b5ff152dab26a397535463 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139181 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>