Skip to content

Commit 5f65664

Browse files
committed
Now fix
1 parent 767d991 commit 5f65664

File tree

8 files changed

+30
-28
lines changed

8 files changed

+30
-28
lines changed

src/ast_nodes.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ namespace Sass {
441441
// Assert and return a color or throws if incompatible
442442
const Color* Value::assertColor(Logger& logger, const sass::string& name) const
443443
{
444-
logger.addFinalStackTrace(pstate());
444+
callStackFrame csf(logger, pstate());
445445
throw Exception::SassScriptException(
446446
inspect() + " is not a color.",
447447
logger, pstate(), name);
@@ -450,7 +450,7 @@ namespace Sass {
450450
// Assert and return a function or throws if incompatible
451451
Function* Value::assertFunction(Logger& logger, const sass::string& name)
452452
{
453-
logger.addFinalStackTrace(pstate());
453+
callStackFrame csf(logger, pstate());
454454
throw Exception::SassScriptException(
455455
inspect() + " is not a function reference.",
456456
logger, pstate(), name);
@@ -459,7 +459,7 @@ namespace Sass {
459459
// Assert and return a map or throws if incompatible
460460
Map* Value::assertMap(Logger& logger, const sass::string& name)
461461
{
462-
logger.addFinalStackTrace(pstate());
462+
callStackFrame csf(logger, pstate());
463463
throw Exception::SassScriptException(
464464
inspect() + " is not a map.",
465465
logger, pstate(), name);
@@ -468,7 +468,7 @@ namespace Sass {
468468
// Assert and return a number or throws if incompatible
469469
Number* Value::assertNumber(Logger& logger, const sass::string& name)
470470
{
471-
logger.addFinalStackTrace(pstate());
471+
callStackFrame csf(logger, pstate());
472472
throw Exception::SassScriptException(
473473
inspect() + " is not a number.",
474474
logger, pstate(), name);
@@ -484,7 +484,7 @@ namespace Sass {
484484
// Assert and return a string or throws if incompatible
485485
String* Value::assertString(Logger& logger, const sass::string& name)
486486
{
487-
logger.addFinalStackTrace(pstate());
487+
callStackFrame csf(logger, pstate());
488488
throw Exception::SassScriptException(
489489
inspect() + " is not a string.",
490490
logger, pstate(), name);
@@ -508,7 +508,7 @@ namespace Sass {
508508
// Assert and return an argument list or throws if incompatible
509509
ArgumentList* Value::assertArgumentList(Logger& logger, const sass::string& name)
510510
{
511-
logger.addFinalStackTrace(pstate());
511+
callStackFrame csf(logger, pstate());
512512
throw Exception::SassScriptException(
513513
inspect() + " is not an argument list.",
514514
logger, pstate(), name);

src/ast_statements.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ namespace Sass {
5555
for (auto cfgvar : config) {
5656
if (cfgvar.second.wasUsed == false) {
5757
if (cfgvar.second.isGuarded == false) {
58-
logger.addFinalStackTrace(cfgvar.second.pstate2);
58+
callStackFrame csf(logger, cfgvar.second.pstate2);
5959
throw Exception::RuntimeException(logger, "$" +
6060
cfgvar.second.name + " was not declared "
6161
"with !default in the @used module.");

src/ast_values.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ namespace Sass {
10451045
return lround(value_);
10461046
}
10471047
SourceSpan span(this->pstate());
1048-
logger.addFinalStackTrace(span);
1048+
callStackFrame csf(logger, span);
10491049
throw Exception::SassScriptException(
10501050
inspect() + " is not an int.",
10511051
logger, span, name);
@@ -1055,7 +1055,7 @@ namespace Sass {
10551055
{
10561056
if (!hasUnits()) return this;
10571057
SourceSpan span(this->pstate());
1058-
logger.addFinalStackTrace(span);
1058+
callStackFrame csf(logger, span);
10591059
throw Exception::SassScriptException(
10601060
"Expected " + inspect() + " to have no units.",
10611061
logger, span, name);
@@ -1065,7 +1065,7 @@ namespace Sass {
10651065
{
10661066
if (hasUnit(unit)) return this;
10671067
SourceSpan span(this->pstate());
1068-
logger.addFinalStackTrace(span);
1068+
callStackFrame csf(logger, span);
10691069
throw Exception::SassScriptException(
10701070
"Expected " + inspect() + " to have unit \"" + unit + "\".",
10711071
logger, span, name);
@@ -1078,7 +1078,7 @@ namespace Sass {
10781078
msg << "Expected " << inspect() << " to be within ";
10791079
msg << min << unit() << " and " << max << unit() << ".";
10801080
SourceSpan span(this->pstate());
1081-
logger.addFinalStackTrace(span);
1081+
callStackFrame csf(logger, span);
10821082
throw Exception::SassScriptException(
10831083
msg.str(), logger, span, name);
10841084
}

src/eval.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ namespace Sass {
666666
return results;
667667
}
668668
else {
669-
logger456.addFinalStackTrace(keywordRest->pstate());
669+
callStackFrame csf(logger456, keywordRest->pstate());
670670
throw Exception::RuntimeException(traces,
671671
"Variable keyword arguments must be a map (was $keywordRest).");
672672
}
@@ -951,7 +951,7 @@ namespace Sass {
951951
}
952952

953953
if (callable == nullptr) {
954-
compiler.addFinalStackTrace(node->pstate());
954+
callStackFrame csf(logger456, node->pstate());
955955
throw Exception::RuntimeException(
956956
logger456, "Undefined mixin.");
957957
}
@@ -1913,7 +1913,7 @@ namespace Sass {
19131913
{
19141914

19151915
if (!isInStyleRule() && !inUnknownAtRule && !inKeyframes) {
1916-
logger456.addFinalStackTrace(node->pstate());
1916+
callStackFrame csf(logger456, node->pstate());
19171917
throw Exception::RuntimeException(traces,
19181918
"Declarations may only be used within style rules.");
19191919
}
@@ -2004,7 +2004,7 @@ namespace Sass {
20042004
NumberObj sass_end = high->assertNumber(logger456, "");
20052005
// check if units are valid for sequence
20062006
if (sass_start->unit() != sass_end->unit()) {
2007-
logger456.addFinalStackTrace(f->pstate());
2007+
callStackFrame csf(logger456, f->pstate());
20082008
throw Exception::UnitMismatch(
20092009
logger456, sass_start, sass_end);
20102010
}
@@ -2037,7 +2037,7 @@ namespace Sass {
20372037
{
20382038

20392039
if (!isInStyleRule() /* || !declarationName.empty() */) {
2040-
logger456.addFinalStackTrace(e->pstate());
2040+
callStackFrame csf(logger456, e->pstate());
20412041
throw Exception::RuntimeException(traces,
20422042
"@extend may only be used within style rules.");
20432043
}
@@ -2050,7 +2050,7 @@ namespace Sass {
20502050
for (const auto& complex : slist->elements()) {
20512051

20522052
if (complex->size() != 1) {
2053-
logger456.addFinalStackTrace(complex->pstate());
2053+
callStackFrame csf(logger456, complex->pstate());
20542054
throw Exception::RuntimeException(traces,
20552055
"complex selectors may not be extended.");
20562056
}

src/fn_colors.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,8 @@ namespace Sass {
10601060
// Support the proprietary Microsoft alpha() function.
10611061
return getFunctionString(Strings::alpha, pstate, arguments);
10621062
}
1063-
compiler.addFinalStackTrace(arguments[0]->pstate());
1063+
compiler.addFinalStackTrace(arguments[0]->pstate());//XXX
1064+
// callStackFrame csf(compiler, arguments[0]->pstate());
10641065
throw Exception::TooManyArguments(compiler, size, 1);
10651066
}
10661067

src/fn_math.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace Sass {
2929
if (double factor = number->getUnitConvertFactor(radiants)) {
3030
return number->value() * factor;
3131
}
32-
compiler.addFinalStackTrace(number->pstate());
32+
callStackFrame csf(compiler, number->pstate());
3333
throw Exception::RuntimeException(compiler, "$" + vname +
3434
": Expected " + number->inspect() + " to be an angle.");
3535
}

src/fn_selectors.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ namespace Sass {
5151
// Iterate over the rest argument list
5252
for (Value* arg : arguments[0]->iterator()) {
5353
if (arg->isNull()) {
54-
compiler.addFinalStackTrace(arg->pstate());
54+
// compiler.addFinalStackTrace(arg->pstate());
55+
callStackFrame csf(compiler, arg->pstate());
5556
throw Exception::RuntimeException(compiler, // "$selectors: "
5657
"null is not a valid selector: it must be a string,\n"
5758
"a list of strings, or a list of lists of strings.");

src/parser_stylesheet.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,7 +1263,7 @@ namespace Sass {
12631263
expectStatementSeparator("@use rule");
12641264

12651265
if (isUseAllowed == false) {
1266-
context.addFinalStackTrace(state);
1266+
callStackFrame csf(context, state);
12671267
throw Exception::TardyAtRule(
12681268
context, Strings::useRule);
12691269
}
@@ -1282,7 +1282,7 @@ namespace Sass {
12821282
if (startsWithIgnoreCase(url, "sass:", 5)) {
12831283

12841284
if (hasWith) {
1285-
context.addFinalStackTrace(rule->pstate());
1285+
callStackFrame csf(context, rule->pstate());
12861286
throw Exception::RuntimeException(context,
12871287
"Built-in modules can't be configured.");
12881288
}
@@ -1294,7 +1294,7 @@ namespace Sass {
12941294
BuiltInMod* module(context.getModule(name));
12951295

12961296
if (module == nullptr) {
1297-
context.addFinalStackTrace(rule->pstate());
1297+
callStackFrame csf(context, rule->pstate());
12981298
throw Exception::RuntimeException(context,
12991299
"Invalid internal module requested.");
13001300
}
@@ -1356,7 +1356,7 @@ namespace Sass {
13561356

13571357
if (isUseAllowed == false) {
13581358
SourceSpan state(scanner.relevantSpanFrom(start));
1359-
context.addFinalStackTrace(state);
1359+
callStackFrame csf(context, state);
13601360
throw Exception::ParserException(context,
13611361
"@forward rules must be written before any other rules.");
13621362
}
@@ -1375,7 +1375,7 @@ namespace Sass {
13751375
if (startsWithIgnoreCase(url, "sass:", 5)) {
13761376

13771377
if (hasWith) {
1378-
context.addFinalStackTrace(rule->pstate());
1378+
callStackFrame csf(context, rule->pstate());
13791379
throw Exception::RuntimeException(context,
13801380
"Built-in modules can't be configured.");
13811381
}
@@ -1386,7 +1386,7 @@ namespace Sass {
13861386
rule->root(nullptr);
13871387
}
13881388
else {
1389-
context.addFinalStackTrace(rule->pstate());
1389+
callStackFrame csf(context, rule->pstate());
13901390
throw Exception::RuntimeException(context,
13911391
"Invalid internal module requested.");
13921392
}
@@ -2740,7 +2740,7 @@ namespace Sass {
27402740

27412741
if (!ns.empty()) {
27422742
auto pstate(scanner.relevantSpanFrom(start));
2743-
context.addFinalStackTrace(pstate);
2743+
callStackFrame csf(context, pstate);
27442744
throw Exception::ParserException(context,
27452745
"Variable namespaces not supported!");
27462746
}
@@ -2918,7 +2918,7 @@ namespace Sass {
29182918
name, inLoopDirective, plain);
29192919

29202920
if (isPrivate(name)) {
2921-
context.addFinalStackTrace(expression->pstate());
2921+
callStackFrame csf(context, expression->pstate());
29222922
throw Exception::ParserException(context,
29232923
"Private members can't be accessed "
29242924
"from outside their modules.");

0 commit comments

Comments
 (0)