Commit 8bb293f5 authored by Riegel's avatar Riegel
Browse files

Changed error messaging to use logger. Ref #69

parent 81964b6c
......@@ -18,6 +18,10 @@
*/
package de.hft.stuttgart.citydoctor2.utils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
......@@ -26,6 +30,8 @@ import java.io.ObjectOutputStream;
public class Copy {
private static final Logger logger = LogManager.getLogger(Copy.class);
private Copy() {
}
......@@ -41,16 +47,11 @@ public class Copy {
ByteArrayInputStream in = new ByteArrayInputStream(byteArray);
ObjectInputStream ois = new ObjectInputStream(in);
return (T) ois.readObject();
} catch (IOException e) {
e.printStackTrace();
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (IOException | ClassNotFoundException e) {
logger.log(Level.ERROR, e.getMessage(), e);
}
throw new IllegalStateException();
// CopyHandler handler = new CopyHandler();
// return handler.copy(original);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment