From 7e11dfbc9cfbe9bcf07f212082ba61eb69510115 Mon Sep 17 00:00:00 2001 From: Tom Mettam <2168418+TomMettam@users.noreply.github.com> Date: Thu, 30 Nov 2023 18:55:40 +0000 Subject: [PATCH] Catch errors in exportXML --- lib/classes/public/GameObject.ts | 28 +++++++++++++++++++++++++--- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/lib/classes/public/GameObject.ts b/lib/classes/public/GameObject.ts index 07ea6537..57064bdd 100644 --- a/lib/classes/public/GameObject.ts +++ b/lib/classes/public/GameObject.ts @@ -58,6 +58,7 @@ import { AssetType } from '../../enums/AssetType'; import { LLGLTFMaterialOverride } from '../LLGLTFMaterialOverride'; import * as uuid from 'uuid'; +import { Logger } from '../Logger'; export class GameObject implements IGameObjectData { @@ -1519,15 +1520,36 @@ export class GameObject implements IGameObjectData { if (this.resolvedAt === undefined) { - await resolver.resolveObjects([this], { includeTempObjects: true }); + try + { + await resolver.resolveObjects([this], { includeTempObjects: true }); + } + catch (e: unknown) + { + Logger.Error(e); + } } if (!this.resolvedInventory) { - await resolver.getInventory(this); + try + { + await resolver.getInventory(this); + } + catch (e: unknown) + { + Logger.Error(e); + } } if (this.calculatedLandImpact === undefined) { - await resolver.getCosts([this]); + try + { + await resolver.getCosts([this]); + } + catch (e: unknown) + { + Logger.Error(e); + } } } diff --git a/package-lock.json b/package-lock.json index a5a5872d..e986fb6f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@caspertech/node-metaverse", - "version": "0.7.21", + "version": "0.7.22", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@caspertech/node-metaverse", - "version": "0.7.21", + "version": "0.7.22", "license": "MIT", "dependencies": { "@caspertech/llsd": "^1.0.5", diff --git a/package.json b/package.json index ded45334..f3b5f214 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@caspertech/node-metaverse", - "version": "0.7.21", + "version": "0.7.22", "description": "A node.js interface for Second Life.", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts",