variable ()
Returns an error message stating an issue with one or more variables.
Parameters
$message
- The message which describes the issue.
- Type
String
$names
- The names of the variables for which there is an issue.
- Type
ArgList<*>
Return Value
String
- A string describing the reason one or more variables are misconfigured.
Example
@use '@sass-fairy/exception';
$height: 20rem !default;
@if meta.type-of($height) != 'number' {
@error exception.variable-type('height', $height, 'number');
}
@if $height < 0 {
@error exception.variable('Value must not be less than zero, but is `#{$height}`', 'height');
}