Sha256: ee9daaf33243ee830b2b07e06e10376cd0ea948414896e5ccdf7673075f51fd0

Contents?: true

Size: 665 Bytes

Versions: 1

Compression:

Stored size: 665 Bytes

Contents

#include "prelexer.hpp"
#include "backtrace.hpp"
#include "error_handling.hpp"

namespace Sass {

  Sass_Error::Sass_Error(Type type, ParserState pstate, string message)
  : type(type), pstate(pstate), message(message)
  { }

  void error(string msg, ParserState pstate)
  { throw Sass_Error(Sass_Error::syntax, pstate, msg); }

  void error(string msg, ParserState pstate, Backtrace* bt)
  {
    if (!pstate.path.empty() && Prelexer::quoted_string(pstate.path.c_str()))
      pstate.path = pstate.path.substr(1, pstate.path.size() - 1);

    Backtrace top(bt, pstate, "");
    msg += top.to_string();

    throw Sass_Error(Sass_Error::syntax, pstate, msg);
  }

}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sassc-0.0.10 ext/libsass/error_handling.cpp