Killed panic's.
authortwisti <none@none>
Mon, 23 May 2005 08:23:40 +0000 (08:23 +0000)
committertwisti <none@none>
Mon, 23 May 2005 08:23:40 +0000 (08:23 +0000)
src/vm/tables.c
src/vm/unzip.c

index aa98ddffc73899d3169556eb9557e73601f4aa83..21437fbe09b1782f864fb163c016ff2f2bb5dd6a 100644 (file)
@@ -1,4 +1,4 @@
-/* vm/tables.c - 
+/* src/vm/tables.c - 
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
@@ -28,6 +28,7 @@
 
    Changes: Mark Probst
             Andreas Krall
+            Christian Thalinger
 
    Contains support functions for:
        - Reading of Java class files
@@ -35,7 +36,7 @@
        - the heap
        - additional support functions
 
-   $Id: tables.c 2195 2005-04-03 16:53:16Z edwin $
+   $Id: tables.c 2505 2005-05-23 08:23:40Z twisti $
 
 */
 
@@ -178,9 +179,11 @@ void tables_close()
 u2 desc_to_type(utf *descriptor)
 {
        char *utf_ptr = descriptor->text;  /* current position in utf text */
-       char logtext[MAXLOGTEXT];
 
-       if (descriptor->blength < 1) panic("Type-Descriptor is empty string");
+       if (descriptor->blength < 1) {
+               log_text("Type-Descriptor is empty string");
+               assert(0);
+       }
        
        switch (*utf_ptr++) {
        case 'B': 
@@ -195,9 +198,7 @@ u2 desc_to_type(utf *descriptor)
        case '[':  return TYPE_ADDRESS;
        }
                        
-       sprintf(logtext, "Invalid Type-Descriptor: ");
-       utf_sprint(logtext+strlen(logtext), descriptor);
-       error("%s",logtext);
+       assert(0);
 
        return 0;
 }
index 40a8ab56d1d6bba0136c0c9fa54e6e4e0b161360..e50493e69fb2ad1207f0d5e338d8bbf2928fbd8d 100644 (file)
@@ -9,9 +9,11 @@
 
 /* Modified my  Joseph Wenninger*/
 
+#include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+
 #include "zlib.h"
 #include "unzip.h"
 #include "mm/memory.h"
@@ -715,8 +717,10 @@ void cacao_create_directoryList(unzFile file)
     return;
 
   do {
-    if (unzGetCurrentFileInfo(file, &tmp, filename, 200, 0, 0, 0, 0) != UNZ_OK)
-      panic("Error in ZIP archive");
+    if (unzGetCurrentFileInfo(file, &tmp, filename, 200, 0, 0, 0, 0) != UNZ_OK) {
+      log_text("Error in ZIP archive");
+      assert(0);
+    }
 
     if ((c = strstr(filename, ".class")))
       *c = '\0';