Skip to content

Commit 3697a3d

Browse files
committed
improve error message
1 parent 3198ab5 commit 3697a3d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/render/managed_buffer.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,15 +458,15 @@ bool ManagedBuffer<T>::deviceBufferTypeIsTexture() {
458458
template <typename T>
459459
void ManagedBuffer<T>::checkDeviceBufferTypeIs(DeviceBufferType targetType) {
460460
if (targetType != deviceBufferType) {
461-
exception("ManagedBuffer has wrong type for this operation. Expected " + deviceBufferTypeName(targetType) +
462-
" but is " + deviceBufferTypeName(deviceBufferType));
461+
exception("ManagedBuffer " + name + " has wrong type for this operation. Expected " +
462+
deviceBufferTypeName(targetType) + " but is " + deviceBufferTypeName(deviceBufferType));
463463
}
464464
}
465465

466466
template <typename T>
467467
void ManagedBuffer<T>::checkDeviceBufferTypeIsTexture() {
468468
if (!deviceBufferTypeIsTexture()) {
469-
exception("ManagedBuffer has wrong type for this operation. Expected a Texture1d/2d/3d but is " +
469+
exception("ManagedBuffer " + name + " has wrong type for this operation. Expected a Texture1d/2d/3d but is " +
470470
deviceBufferTypeName(deviceBufferType));
471471
}
472472
}

0 commit comments

Comments
 (0)