Merged branch subtype-trunk into default.
[cacao.git] / src / vm / linker.cpp
index 50639b736310468fe801800ded6d5af43b443748..b1bd60a427ca66815990cf6269939f03395e75be 100644 (file)
 
 #include "vm/types.h"
 
-#include "mm/memory.h"
+#include "mm/memory.hpp"
 
 #include "native/native.hpp"
 
 #include "threads/lock.hpp"
 #include "threads/mutex.hpp"
 
-#include "toolbox/logging.h"
+#include "toolbox/logging.hpp"
 
 #include "vm/access.hpp"
 #include "vm/array.hpp"
@@ -1108,8 +1108,8 @@ static arraydescriptor *link_array(classinfo *c)
                        desc->elementvftbl = compvftbl->arraydesc->elementvftbl;
 
                        if (compvftbl->arraydesc->dimension >= 255) {
-                               log_text("Creating array of dimension >255");
-                               assert(0);
+                               exceptions_throw_illegalargumentexception();
+                               return NULL;
                        }
 
                        desc->dimension = compvftbl->arraydesc->dimension + 1;