error reporting in editor window

This commit is contained in:
2023-08-21 16:35:46 +02:00
parent 5a732dd03c
commit 5cb89a3b32
4 changed files with 21 additions and 4 deletions

View File

@ -63,6 +63,15 @@ export class UserAPI {
//this.load = samples("github:tidalcycles/Dirt-Samples/master");
}
_reportError = (error: any): void => {
console.log(error)
if (!this.app.show_error) {
this.app.error_line.innerHTML = error as string;
this.app.error_line.classList.remove('hidden');
setInterval(() => this.app.error_line.classList.add('hidden'), 2000)
}
}
// =============================================================
// Time functions
// =============================================================