Skip to content

Commit 5c213e6

Browse files
authored
Add support for unknown errors (#251)
## Description - Handle unknown errors in the avatarLoader.
2 parents 8c9abe7 + 8e74ec2 commit 5c213e6

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Runtime/Core/Scripts/AvatarObjectLoader.cs

+5
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,11 @@ private async void Load(string url)
144144
Failed(executor.IsCancelled ? FailureType.OperationCancelled : exception.FailureType, exception.Message);
145145
return;
146146
}
147+
catch (Exception e)
148+
{
149+
Failed(FailureType.Unknown, e.Message);
150+
return;
151+
}
147152

148153
var avatar = (GameObject) context.Data;
149154
avatar.SetActive(true);

Runtime/Core/Scripts/Data/Enums.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ public enum FailureType
9898
DirectoryAccessError,
9999
AvatarProcessError,
100100
AvatarRenderError,
101-
OperationCancelled
101+
OperationCancelled,
102+
Unknown
102103
}
103104

104105
public enum Expression

0 commit comments

Comments
 (0)