Skip to content

Commit

Permalink
Catch errors in exportXML
Browse files Browse the repository at this point in the history
  • Loading branch information
TomMettam committed Nov 30, 2023
1 parent d263af3 commit 7e11dfb
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
28 changes: 25 additions & 3 deletions lib/classes/public/GameObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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);
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 7e11dfb

Please sign in to comment.