Problem summary
The error-to-raise-arguments-error rule shouldn't apply when the error message uses ~a under quotes, like it did in racket/drracket#779. It should only apply if all uses of ~a in the message are surrounded by spaces.
Test case for code that shouldn't be refactored
#lang resyntax/test
no-change-test: "this code should not be refactored"
--------------------
#lang racket
(define (find-output-radio-box label)
(error 'find-output-radio-box "could not find `~a' radio box"
label))
--------------------
Unwanted suggestion
#lang racket
(define (f label)
(raise-arguments-error 'find-output-radio-box "could not find `' radio box" "label" label))
Problem summary
The
error-to-raise-arguments-errorrule shouldn't apply when the error message uses~aunder quotes, like it did in racket/drracket#779. It should only apply if all uses of~ain the message are surrounded by spaces.Test case for code that shouldn't be refactored
Unwanted suggestion