Skip to content

ncoden/sass-errors

Repository files navigation

Sass Errors Build Status

✨ Awesome Error Handling in Sass

Install

npm install sass-errors --save-dev

Usage

Documentation: https://ncoden.github.io/sass-errors/docs

Basic Example

@import 'sass-errors';
@import 'sass-errors-alias'; // se- alias

@function division($number, $divisor) {
  @if $divisor == 0 {
    @return se-throw('Dividor cannot equal to 0.', 'dividor_zero');
  }
  @return $number / $divisor;
}

$ret: division(42, 0); // -> false

$e: se-catch();
@if $e {
  // Display @error 'Dividor cannot equal to 0.'
  $_: se-error($e);
}

Version 0.4.1 - MIT License.