aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/rosa/azalea/evaluate.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/rosa/azalea/evaluate.go b/internal/rosa/azalea/evaluate.go
index 3b55f863..9b119100 100644
--- a/internal/rosa/azalea/evaluate.go
+++ b/internal/rosa/azalea/evaluate.go
@@ -223,7 +223,12 @@ func (e EvaluationError) Unwrap() error { return e.Err }
// Error returns a very long error description that should not be presented
// to the user directly.
func (e EvaluationError) Error() string {
- return fmt.Sprintf("expression %#v: %v", e.Expr, e.Err)
+ v, ok := errors.AsType[EvaluationError](e.Err)
+ if ok {
+ return fmt.Sprintf("%v\n%s", v, ExprText(e.Expr))
+ }
+
+ return fmt.Sprintf("%v\n\n%s", e.Err, ExprText(e.Expr))
}
var (