Exception: Phlex::Reactive::UnknownParamType

Inherits:
ArgumentError
  • Object
show all
Defined in:
lib/phlex/reactive.rb

Overview

Raised at DECLARATION time (Component.action -> ParamSchema.compile) when a param schema names a type symbol that isn't in the registry — a typo like params: { count: :interger }. A stdlib ArgumentError subclass (NOT a NameError): the mistake is a bad ARGUMENT to action, and callers rescue ArgumentError, not NameError, for a bad-input contract. Loud at class load (eager loading in production; first constant reference under Zeitwerk dev) instead of a silent to_s at request time.

Superclass is fully qualified ::ArgumentError: the phlex gem defines Phlex::ArgumentError, and a bare ArgumentError here resolves LEXICALLY to that (Phlex::Reactive -> Phlex), coupling us to a Phlex error rather than the stdlib one an app catches.