refactor: add error checking for instantiation
This commit is contained in:
parent
bc6242b0f7
commit
8a086da698
1 changed files with 6 additions and 1 deletions
|
@ -46,7 +46,12 @@ function obtainVenmic() {
|
||||||
|
|
||||||
if (PatchBay && !initialized) {
|
if (PatchBay && !initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
patchBayInstance = new PatchBay();
|
|
||||||
|
try {
|
||||||
|
patchBayInstance = new PatchBay();
|
||||||
|
} catch (e: any) {
|
||||||
|
console.error("Failed to instantiate venmic", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return patchBayInstance;
|
return patchBayInstance;
|
||||||
|
|
Reference in a new issue