@@ 1,5 1,5 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012-2024 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012-2025 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
;;;
;;; This file is part of GNU Guix.
@@ 671,7 671,9 @@ an unknown field is queried."
((_ record type (fields ...) body ...)
(if (eq? (struct-vtable record) type)
(match-record-inner record type (fields ...) body ...)
- (throw 'wrong-type-arg record)))))
+ (throw 'wrong-type-arg "match-record"
+ "Wrong type (expecting a ~a record): ~S"
+ (list 'type record) (list record))))))
(define-syntax match-record-lambda
(syntax-rules ()