invalid-operator-value-error.js 459 B

123456789101112131415161718192021222324
  1. import {format} from '@e22m4u/util-format';
  2. /**
  3. * Invalid operator value error.
  4. */
  5. export class InvalidOperatorValueError extends Error {
  6. /**
  7. * Constructor.
  8. *
  9. * @param {string} operator
  10. * @param {string} expected
  11. * @param {*} value
  12. */
  13. constructor(operator, expected, value) {
  14. super(
  15. format(
  16. 'Condition of {%s: ...} should have %s, %v given.',
  17. operator,
  18. expected,
  19. value,
  20. ),
  21. );
  22. }
  23. }