Sha256: 97f0b204cd232bcfe8712940c72c7732f16351ede9ff4765884cb467365447b1

Contents?: true

Size: 1.06 KB

Versions: 48

Compression:

Stored size: 1.06 KB

Contents

#include "backtrace.hpp"

namespace Sass {

  const std::string traces_to_string(Backtraces traces, std::string indent) {

    std::stringstream ss;
    std::string cwd(File::get_cwd());

    bool first = true;
    size_t i_beg = traces.size() - 1;
    size_t i_end = std::string::npos;
    for (size_t i = i_beg; i != i_end; i --) {

      const Backtrace& trace = traces[i];

      // make path relative to the current directory
      std::string rel_path(File::abs2rel(trace.pstate.path, cwd, cwd));

      // skip functions on error cases (unsure why ruby sass does this)
      // if (trace.caller.substr(0, 6) == ", in f") continue;

      if (first) {
        ss << indent;
        ss << "on line ";
        ss << trace.pstate.line + 1;
        ss << " of " << rel_path;
        // ss << trace.caller;
        first = false;
      } else {
        ss << trace.caller;
        ss << std::endl;
        ss << indent;
        ss << "from line ";
        ss << trace.pstate.line + 1;
        ss << " of " << rel_path;
      }

    }

    ss << std::endl;
    return ss.str();

  }

};

Version data entries

48 entries across 46 versions & 15 rubygems

Version Path
optimacms-0.1.61 spec/dummy/node_modules/@rails/webpacker/node_modules/node-sass/src/libsass/src/backtrace.cpp
optimacms-0.1.61 spec/dummy/node_modules/node-sass/src/libsass/src/backtrace.cpp
disco_app-0.18.0 test/dummy/node_modules/node-sass/src/libsass/src/backtrace.cpp
disco_app-0.18.2 test/dummy/node_modules/node-sass/src/libsass/src/backtrace.cpp
tang-0.2.1 spec/tang_app/node_modules/node-sass/src/libsass/src/backtrace.cpp
groonga-client-model-6.0.0 test/apps/rails6.1.3/node_modules/node-sass/src/libsass/src/backtrace.cpp
groonga-client-model-6.0.0 test/apps/rails6.0.3.5/node_modules/node-sass/src/libsass/src/backtrace.cpp
ruby2js-4.0.4 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/backtrace.cpp
ruby2js-4.0.3 lib/tasks/testrails/node_modules/node-sass/src/libsass/src/backtrace.cpp
tang-0.2.0 spec/tang_app/node_modules/node-sass/src/libsass/src/backtrace.cpp
tang-0.1.0 spec/tang_app/node_modules/node-sass/src/libsass/src/backtrace.cpp
tang-0.0.9 spec/tang_app/node_modules/node-sass/src/libsass/src/backtrace.cpp
enju_library-0.3.8 spec/dummy/node_modules/node-sass/src/libsass/src/backtrace.cpp
files.com-1.0.55 docs/vendor/bundle/ruby/2.5.0/gems/sassc-2.0.0/ext/libsass/src/backtrace.cpp
ilog-0.4.1 node_modules/node-sass/src/libsass/src/backtrace.cpp
ilog-0.4.0 node_modules/node-sass/src/libsass/src/backtrace.cpp
ilog-0.3.3 node_modules/node-sass/src/libsass/src/backtrace.cpp
zuora_connect_ui-0.10.0 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/backtrace.cpp
zuora_connect_ui-0.9.2 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/backtrace.cpp
zuora_connect_ui-0.9.1 vendor/ruby/2.6.0/gems/sassc-2.0.1/ext/libsass/src/backtrace.cpp