Example usage for java.util.logging Level SEVERE

List of usage examples for java.util.logging Level SEVERE

Introduction

In this page you can find the example usage for java.util.logging Level SEVERE.

Prototype

Level SEVERE

To view the source code for java.util.logging Level SEVERE.

Click Source Link

Document

SEVERE is a message level indicating a serious failure.

Usage

From source file:com.vrane.metaGlacierSDK.MD5File.java

String md5hex() {
    try (FileInputStream in = new FileInputStream(path)) {
        return DigestUtils.md5Hex(in);
    } catch (FileNotFoundException ex) {
        LGR.log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
        LGR.log(Level.SEVERE, null, ex);
    } catch (Exception e) {
        if (e.getSuppressed() != null) {
            for (Throwable t : e.getSuppressed()) {
                LGR.log(Level.SEVERE, null, t);
            }/*from ww w  .j  a v  a2  s  .  c o  m*/
        } else {
            LGR.log(Level.SEVERE, null, e);
        }
    }
    return null;
}

From source file:com._8x8.logic.service.QRCodeService.java

@Override
public ByteArrayOutputStream getQRCodeBytesStream(String text) {

    String encryptQRCodeTxt = "";
    try {//ww  w .  ja v a 2s .com
        encryptQRCodeTxt = _encryptorService.encryptCode(text);
    } catch (Exception ex) {
        Logger.getLogger(QRCodeService.class.getName()).log(Level.SEVERE, null, ex);
    }

    ByteArrayOutputStream stream = QRCode.from(encryptQRCodeTxt).stream();
    return stream;
}

From source file:gradingfun.GradeParser.java

public GradeParser(File file) {
    try {/*from  w  w w.j a va 2  s.com*/
        this.parser = CSVParser.parse(file, Charset.defaultCharset(), CSVFormat.RFC4180);
    } catch (IOException ex) {
        Logger.getLogger(GradeParser.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:de.kaojo.chat.TextMessageEncoder.java

@Override
public String encode(Message object) throws EncodeException {
    ObjectMapper mapper = new ObjectMapper();
    try {/*from   w  w w . j a  va 2 s .com*/
        return mapper.writeValueAsString(object);
    } catch (JsonProcessingException ex) {
        Logger.getLogger(TextMessageEncoder.class.getName()).log(Level.SEVERE, null, ex);
        throw new EncodeException(object, "Could not encode Message", ex);
    }
}

From source file:com.aes.touresbalon.touresbalonoms.utilities.OmsUtil.java

public static void copiarPropiedades(Object origen, Object destino) {
    try {/*  ww w . j  a  va 2  s  .  co  m*/
        org.apache.commons.beanutils.BeanUtils.copyProperties(origen, destino);
    } catch (IllegalAccessException | InvocationTargetException ex) {
        Logger.getLogger(OmsUtil.class.getName()).log(Level.SEVERE,
                "Error al usar utilitario copiar propiedades", ex);
    }
}

From source file:com.eu.evaluation.server.eva.Thread1.java

public void run() {
    try {//w ww .j  a  v a 2  s  .c  o m
        double t = Math.random();
        long sleep = (long) (t * 10000);
        Thread.sleep(sleep);
        logger.debug(" : " + threadName + "  " + sleep);
    } catch (InterruptedException ex) {
        Logger.getLogger(Thread1.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.liscs.server.utils.JacksonUtils.java

public T stringToObject(String json, Class clazz) {
    ObjectMapper objectMapper = new ObjectMapper();
    objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
    try {/*  w  w  w. j av  a  2s.  c om*/
        T result = (T) objectMapper.readValue(json, clazz);
        return result;
    } catch (IOException ex) {
        Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, null, ex);
    }
    return null;
}

From source file:com.u2apple.tool.service.IdentifyAnalyticsService.java

private static Map loadModels() {
    Map<String, String> map = new HashMap<>();
    Properties props = new Properties();
    try {//from w  w w  .j a  va  2s.c  o m
        props.load(IdentifyAnalyticsService.class.getResourceAsStream(Constants.MODELS));
        props.forEach((Object key, Object value) -> {
            String productId = (String) key;
            String model = AndroidDeviceUtils.formatModel((String) value);
            if (model.contains(",")) {
                String[] models = model.split(",");
                for (String m : models) {
                    map.put(m.trim(), productId);
                }
            } else {
                map.put(model, productId);
            }
        });
    } catch (IOException ex) {
        Logger.getLogger(IdentifyAnalyticsService.class.getName()).log(Level.SEVERE, null, ex);
    }
    return map;
}

From source file:com.mmone.hsqldb.Database.java

public Database(String dbPath) {
    this.dbParh = dbPath;
    try {/*from w  w w  . ja va  2  s .com*/
        setup();
    } catch (SQLException ex) {
        System.out.println("Error - " + ex.getMessage());
        Logger.getLogger(Database.class.getName()).log(Level.SEVERE, null, ex);
    }
}

From source file:com.mmone.gpdati.allotment.GpDatiDbDispoMap.java

public GpDatiDbDispoMap(Database database) {
    this.database = database;
    try {//  w w w.j  a  va  2  s  . c o  m
        loadAll();
    } catch (SQLException ex) {
        Logger.getLogger(GpDatiDispoRecord.class.getName()).log(Level.SEVERE, null, ex);
    }
}