#include <stdexcept>
#include "buffer.h"
#include "bufferable.h"
+#include "error.h"
using namespace std;
void Bufferable::upload_data(char *target) const
{
+ if(!buffer)
+ throw invalid_operation("Bufferable::upload_data");
+
unsigned data_size = get_data_size();
if(location_dirty)
{