uiconfig = new UiConfigBundle();
trans = new StringIdBundle(getLang());
- try {
- lib = new LocalLibrary(getFile(Config.LIBRARY_DIR));
- } catch (Exception e) {
- syserr(new IOException("Cannot create library for directory: "
- + getFile(Config.LIBRARY_DIR), e));
- }
boolean debug = Instance.getConfig()
.getBoolean(Config.DEBUG_ERR, false);
tracer.setShowErrorDetails(debug);
tracer.setShowTraces(trace);
+ try {
+ lib = new LocalLibrary(getFile(Config.LIBRARY_DIR));
+ } catch (Exception e) {
+ syserr(new IOException("Cannot create library for directory: "
+ + getFile(Config.LIBRARY_DIR), e));
+ }
+
// Could have used: System.getProperty("java.io.tmpdir")
if (tmp == null) {
tmp = new File(configDir, "tmp");
* @return the {@link LocalLibrary}
*/
public static BasicLibrary getLibrary() {
+ if (lib == null) {
+ throw new NullPointerException("We don't have a library to return");
+ }
+
return lib;
}