Buffer, [Render]Window now always throw on error

Former-commit-id: a739cd4c7d96e7cf497338c525e9ab1b5d6a844a
This commit is contained in:
Lynix
2014-08-18 15:45:37 +02:00
parent 0d69da09b9
commit f56e0504e6
3 changed files with 6 additions and 40 deletions

View File

@@ -4,6 +4,7 @@
#include <Nazara/Utility/Buffer.hpp>
#include <Nazara/Core/Error.hpp>
#include <Nazara/Core/ErrorFlags.hpp>
#include <Nazara/Utility/AbstractBuffer.hpp>
#include <Nazara/Utility/BufferMapper.hpp>
#include <Nazara/Utility/Config.hpp>
@@ -32,15 +33,8 @@ NzBuffer::NzBuffer(nzBufferType type, unsigned int size, nzBufferStorage storage
m_type(type),
m_impl(nullptr)
{
NzErrorFlags flags(nzErrorFlag_ThrowException, true);
Create(size, storage, usage);
#ifdef NAZARA_DEBUG
if (!m_impl)
{
NazaraError("Failed to create buffer");
throw std::runtime_error("Constructor failed");
}
#endif
}
NzBuffer::~NzBuffer()