This repository was archived by the owner on Oct 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,17 @@ namespace Sass {
2020 caller(c)
2121 { }
2222
23- string to_string ()
23+ string to_string (bool warning = false )
2424 {
2525 stringstream ss;
2626 Backtrace* this_point = this ;
2727
28- ss << endl << " Backtrace:" ;
28+ if (!warning) ss << endl << " Backtrace:" ;
2929 // the first tracepoint (which is parent-less) is an empty placeholder
3030 while (this_point->parent ) {
3131 ss << endl
3232 << " \t "
33+ << (warning ? " " : " " )
3334 << this_point->path
3435 << " :"
3536 << this_point->line
Original file line number Diff line number Diff line change @@ -318,8 +318,10 @@ namespace Sass {
318318 result = result.substr (1 , result.size ()-2 ); // unquote if it's a single string
319319 }
320320 // These cerrs aren't log lines! They're supposed to be here!
321- cerr << prefix << result << endl;
322- cerr << indent << " on line " << expr.line () << " of " << expr.path ();
321+ cerr << prefix << result;
322+ // cerr << indent << "on line " << expr.line() << " of " << expr.path();
323+ Backtrace top (&bt, expr.path (), expr.line (), " " );
324+ cerr << top.to_string (true );
323325 cerr << endl << endl;
324326 } break ;
325327
@@ -1026,8 +1028,10 @@ namespace Sass {
10261028 result = result.substr (1 , result.size ()-2 ); // unquote if it's a single string
10271029 }
10281030 // These cerrs aren't log lines! They're supposed to be here!
1029- cerr << prefix << result << endl;
1030- cerr << indent << " on line " << stm.line () << " of " << stm.path ();
1031+ cerr << prefix << result;
1032+ // cerr << indent << "on line " << stm.line() << " of " << stm.path();
1033+ Backtrace top (&bt, stm.path (), stm.line (), " " );
1034+ cerr << top.to_string (true );
10311035 cerr << endl << endl;
10321036 } break ;
10331037
You can’t perform that action at this time.
0 commit comments