@nativescript/windows 0.1.0-alpha.18 → 0.1.0-alpha.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/framework/__PROJECT_NAME__/App.xaml.cs +3 -0
- package/framework/__PROJECT_NAME__/CrashDiagnostics.cs +17 -0
- package/framework/libs/arm64/nativescript.dll +0 -0
- package/framework/libs/devtools/arm64/nativescript.dll +0 -0
- package/framework/libs/devtools/x64/nativescript.dll +0 -0
- package/framework/libs/x64/nativescript.dll +0 -0
- package/package.json +1 -1
|
@@ -47,6 +47,7 @@ namespace __PROJECT_NAME__
|
|
|
47
47
|
{
|
|
48
48
|
CrashDiagnostics.WriteMessage("JS Error", jsError);
|
|
49
49
|
var report = CrashDiagnostics.BuildErrorReport(null, jsError);
|
|
50
|
+
CrashDiagnostics.WriteToTraceLog(report);
|
|
50
51
|
await CrashDiagnostics.ShowCrashDialogAsync("JavaScript Error", report);
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -56,6 +57,7 @@ namespace __PROJECT_NAME__
|
|
|
56
57
|
System.Diagnostics.Debug.WriteLine($"[NativeScript] Script exception: {scriptEx.Message}");
|
|
57
58
|
CrashDiagnostics.WriteExceptionReport("RunMainScript", scriptEx, null);
|
|
58
59
|
var report = CrashDiagnostics.BuildErrorReport(scriptEx, jsError);
|
|
60
|
+
CrashDiagnostics.WriteToTraceLog(report);
|
|
59
61
|
await CrashDiagnostics.ShowCrashDialogAsync("Script Execution Error", report);
|
|
60
62
|
}
|
|
61
63
|
|
|
@@ -102,6 +104,7 @@ namespace __PROJECT_NAME__
|
|
|
102
104
|
"JsError=" + (jsError ?? "<none>"));
|
|
103
105
|
|
|
104
106
|
var report = CrashDiagnostics.BuildErrorReport(e.Exception, jsError);
|
|
107
|
+
CrashDiagnostics.WriteToTraceLog(report);
|
|
105
108
|
var _ = CrashDiagnostics.ShowCrashDialogAsync(
|
|
106
109
|
e.Message ?? "Unhandled exception", report);
|
|
107
110
|
}
|
|
@@ -168,6 +168,23 @@ namespace __PROJECT_NAME__
|
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
+
/// <summary>
|
|
172
|
+
/// Appends <paramref name="message"/> to ns_trace.log using the Win32 temp path.
|
|
173
|
+
/// Inside UWP, GetTempPath() virtualises to AC\Temp — the same folder Rust's
|
|
174
|
+
/// std::env::temp_dir() uses — so this write appears in the CLI's log stream.
|
|
175
|
+
/// </summary>
|
|
176
|
+
public static void WriteToTraceLog(string message)
|
|
177
|
+
{
|
|
178
|
+
try
|
|
179
|
+
{
|
|
180
|
+
// System.IO.Path.GetTempPath() calls Win32 GetTempPathW() which inside a
|
|
181
|
+
// UWP process returns the container's AC\Temp folder, matching Rust.
|
|
182
|
+
var tracePath = Path.Combine(System.IO.Path.GetTempPath(), "ns_trace.log");
|
|
183
|
+
File.AppendAllText(tracePath, message, Encoding.UTF8);
|
|
184
|
+
}
|
|
185
|
+
catch { }
|
|
186
|
+
}
|
|
187
|
+
|
|
171
188
|
private static void AppendToLog(string content)
|
|
172
189
|
{
|
|
173
190
|
try
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|