mirror of
https://github.com/TriliumNext/Notes.git
synced 2026-01-05 20:39:49 -06:00
throwException instead of throwing exceptions manually (includes stacktrace)
This commit is contained in:
@@ -30,6 +30,10 @@ function showError(message) {
|
||||
});
|
||||
}
|
||||
|
||||
function throwError(message) {
|
||||
throw new Error(message + ':' + new Error().stack);
|
||||
}
|
||||
|
||||
function getDateFromTS(timestamp) {
|
||||
// Date accepts number of milliseconds since epoch so UTC timestamp works without any extra handling
|
||||
// see https://stackoverflow.com/questions/4631928/convert-utc-epoch-to-local-date-with-javascript
|
||||
|
||||
Reference in New Issue
Block a user