Skip to content

Commit 98e8d55

Browse files
committed
Adjust more error reporting
1 parent 6d6e4c7 commit 98e8d55

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/error_handling.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ namespace Sass {
4141
InvalidArgumentType::InvalidArgumentType(ParserState pstate, Backtraces traces, std::string fn, std::string arg, std::string type, const Value* value)
4242
: Base(pstate, def_msg, traces), fn(fn), arg(arg), type(type), value(value)
4343
{
44-
msg = arg + ": \"";
44+
msg = arg + ": ";
4545
if (value) msg += value->to_string(Sass_Inspect_Options());
46-
msg += "\" is not a " + type + " for `" + fn + "'";
46+
msg += " is not a " + type + ".";
4747
}
4848

4949
MissingArgument::MissingArgument(ParserState pstate, Backtraces traces, std::string fn, std::string arg, std::string fntype)

src/fn_miscs.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ namespace Sass {
9191
return SASS_MEMORY_NEW(Boolean, pstate, features->find(s) != features->end());
9292
}
9393

94-
Signature call_sig = "call($name, $args...)";
94+
Signature call_sig = "call($function, $args...)";
9595
BUILT_IN(call)
9696
{
9797
std::string name;
98-
Function* ff = Cast<Function>(env["$name"]);
99-
// Interpolation* ss = Cast<Interpolation>(env["$name"]);
100-
String_Constant* ss = Cast<String_Constant>(env["$name"]);
98+
Function* ff = Cast<Function>(env["$function"]);
99+
// Interpolation* ss = Cast<Interpolation>(env["$function"]);
100+
String_Constant* ss = Cast<String_Constant>(env["$function"]);
101101

102102
if (ss) {
103103
name = unquote(ss->value());

src/fn_numbers.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ namespace Sass {
6060
BUILT_IN(percentage)
6161
{
6262
Number_Obj n = ARGN("$number");
63-
if (!n->is_unitless()) error("Exprected " + n->to_string() + " to have no units.", pstate, traces);
63+
if (!n->is_unitless()) error("$number: Expected " + n->to_string() + " to have no units.", pstate, traces);
6464
return SASS_MEMORY_NEW(Number, pstate, n->value() * 100, "%");
6565
}
6666

0 commit comments

Comments
 (0)