]> git.tdb.fi Git - libs/gl.git/blobdiff - source/buffer.cpp
Rework exceptions
[libs/gl.git] / source / buffer.cpp
index 395057cd90ff4bf61e95a7be7c833fefaa20515f..fbb1e159ee564df8b2d7816e459adda6312cfc20 100644 (file)
@@ -1,7 +1,10 @@
+#include <stdexcept>
 #include "arb_vertex_buffer_object.h"
 #include "extension.h"
 #include "buffer.h"
 
+using namespace std;
+
 namespace Msp {
 namespace GL {
 
@@ -70,7 +73,7 @@ const Buffer *&Buffer::binding(BufferType type)
        case ELEMENT_ARRAY_BUFFER: return bound[1];
        case PIXEL_PACK_BUFFER:    return bound[2];
        case PIXEL_UNPACK_BUFFER:  return bound[3];
-       default: throw InvalidParameterValue("Invalid buffer type");
+       default: throw invalid_argument("Buffer::binding");
        }
 }