-
Notifications
You must be signed in to change notification settings - Fork 61
Convert all our IDs from strings to validated GUIDs #476
Conversation
log.error('network', `[ERROR] setAuthoritativeClient: client ${clientId} does not exist.`); | ||
throw new Error(`Client ${clientId} does not exist.`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new Error(
Client ${clientId} does not exist.
); [](start = 3, length = 54)
Ensure this exception is handled and doesn't exit SDK code. Or remove it. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to simply return? I don't think this case is ever hit, because the app would throw later on in this function if it did.
In reply to: 372071873 [](ancestors = 372071873)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I think just returning would be better. We never hit this that we know of. We don't have a way to recover from this if it were to happen.
In reply to: 372075051 [](ancestors = 372075051,372071873)
} | ||
|
||
/** @inheritdoc */ | ||
public get meshId() { return this._meshId; } | ||
public set meshId(value) { | ||
if (!value || value.startsWith('0000')) { | ||
if (!value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
value [](start = 7, length = 5)
The logic here used to also check for a non-null value of all zeros. How is that accounted for now? #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All-zero GUIDs don't need this path, since the "then" part is to use the Zero guid instead.
In reply to: 372083083 [](ancestors = 372083083)
} | ||
|
||
/** @inheritdoc */ | ||
public get mainTextureId() { return this._mainTextureId; } | ||
public set mainTextureId(value) { | ||
if (!value || value.startsWith('0000')) { | ||
if (!value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
f (!value) { [](start = 3, length = 12)
Same question here. #Resolved
} | ||
|
||
/** @inheritdoc */ | ||
public get materialId() { return this._materialId; } | ||
public set materialId(value) { | ||
if (!value || value.startsWith('0000')) { | ||
if (!value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (!value) { [](start = 2, length = 13)
Same question here. #Resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🕐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup.
No description provided.