| 149 | } |
| 150 | |
| 151 | std::string buildLogString(const v8::FunctionCallbackInfo<v8::Value>& info, int startingIndex = 0) { |
| 152 | auto isolate = info.GetIsolate(); |
| 153 | v8::HandleScope scope(isolate); |
| 154 | std::stringstream ss; |
| 155 | |
| 156 | auto argLen = info.Length(); |
| 157 | if (argLen) { |
| 158 | for (int i = startingIndex; i < argLen; i++) { |
| 159 | // separate args with a space |
| 160 | if (i != 0) { |
| 161 | ss << " "; |
| 162 | } |
| 163 | |
| 164 | std::string argString = buildStringFromArg(isolate, info[i]); |
| 165 | ss << argString; |
| 166 | } |
| 167 | } else { |
| 168 | ss << std::endl; |
| 169 | } |
| 170 | |
| 171 | return ss.str(); |
| 172 | } |
| 173 | |
| 174 | void Console::assertCallback(const v8::FunctionCallbackInfo<v8::Value>& info) { |
| 175 | try { |
no test coverage detected