title: Error handling in SASS
body: <p>I'd like to handle some errors in my scss code.</p>
  
  <p>Imagine this code.</p>
  
  <pre><code>$color: 12;
  
  a {
    @if (type-of($color) != color) {
      // trow an error
    }
  }
  </code></pre>
  
  <p>Now I use a mixin, that takes some params and calls <code>@error</code> or <code>@warn</code>.</p>
  
  <pre><code>@mixin log($type, $message) {
    @if ($type == error) {
      @error $message;
    } @else {
      //
    }
  }
  </code></pre>
  
  <p>But I don't want to call it every time via <code>@include</code>: <code>@include log(error, "message");</code>.</p>
  
  <p>I'd wont something like this:</p>
  
  <pre><code>a {
    @if (type-of($color) != color) {
      log(error, "message");
    }
  }
  </code></pre>
  
  <p>So, is there a way to write a function (or not a function) to call it inside a selector?</p>