ext/libsass/error_handling.cpp in sassc-1.0.0 vs ext/libsass/error_handling.cpp in sassc-1.1.0

- old
+ new

@@ -6,20 +6,30 @@ Sass_Error::Sass_Error(Type type, ParserState pstate, string message) : type(type), pstate(pstate), message(message) { } - void error(string msg, ParserState pstate) + void warn(string msg, ParserState pstate) { - throw Sass_Error(Sass_Error::syntax, pstate, msg); + cerr << "Warning: " << msg<< endl; } - void error(string msg, ParserState pstate, Backtrace* bt) + void warn(string msg, ParserState pstate, Backtrace* bt) { - Backtrace top(bt, pstate, ""); msg += top.to_string(); + warn(msg, pstate); + } + void error(string msg, ParserState pstate) + { throw Sass_Error(Sass_Error::syntax, pstate, msg); + } + + void error(string msg, ParserState pstate, Backtrace* bt) + { + Backtrace top(bt, pstate, ""); + msg += "\n" + top.to_string(); + error(msg, pstate); } }