Skip to content

Commit 8b66dcd

Browse files
authored
Merge pull request #1465 from NativeScript/trifonov/format-fix
fix: formatting fixed to match the right format
2 parents 7255aba + f4535a0 commit 8b66dcd

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ node_modules/
33
dist/
44
.gradle
55
.idea
6+
.cxx/
67

78
local.properties
89

test-app/app/src/main/assets/app/tests/exceptionHandlingTests.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,12 +312,12 @@ describe("Tests exception handling ", function () {
312312
require("./syntaxErrors.js");
313313
} catch (e) {
314314
exceptionCaught = true;
315-
errMsg = e.fullMessage
315+
errMsg = e.fullMessage;
316316
}
317317
expect(exceptionCaught).toBe(true);
318318
expect(errMsg).toContain("Cannot compile /data/data/com.tns.testapplication/files/app/tests/syntaxErrors.js");
319319
expect(errMsg).toContain("SyntaxError: Unexpected token class");
320-
expect(errMsg).toContain("File: \"file:///data/data/com.tns.testapplication/files/app/tests/syntaxErrors.js, line: 3, column: 4");
320+
expect(errMsg).toContain("File: (file:///data/data/com.tns.testapplication/files/app/tests/syntaxErrors.js:3:4)");
321321
});
322322

323323
// run this test only for API level bigger than 25 as we have handling there

test-app/runtime/src/main/cpp/NativeScriptException.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,11 +236,11 @@ string NativeScriptException::GetFullMessage(const TryCatch& tc, const string& j
236236
string stackTraceMessage = GetErrorStackTrace(message->GetStackTrace());
237237

238238
if (!scriptResName.IsEmpty() && scriptResName->IsString()) {
239-
ss << endl <<"File: \"" << ArgConverter::ConvertToString(scriptResName.As<String>());
239+
ss << endl <<"File: (" << ArgConverter::ConvertToString(scriptResName.As<String>());
240240
} else {
241-
ss << endl <<"File: \"<unknown>";
241+
ss << endl <<"File: (<unknown>";
242242
}
243-
ss << ", line: " << message->GetLineNumber(context).ToChecked() << ", column: " << message->GetStartColumn() << endl << endl;
243+
ss << ":" << message->GetLineNumber(context).ToChecked() << ":" << message->GetStartColumn() << ")" << endl << endl;
244244
ss << "StackTrace: " << endl << stackTraceMessage << endl;
245245

246246
string loggedMessage = ss.str();

0 commit comments

Comments
 (0)