Example usage for org.hibernate.cfg RecoverableException RecoverableException

List of usage examples for org.hibernate.cfg RecoverableException RecoverableException

Introduction

In this page you can find the example usage for org.hibernate.cfg RecoverableException RecoverableException.

Prototype

public RecoverableException(String msg) 

Source Link

Document

Constructs a RecoverableException using the given message and underlying cause.

Usage

From source file:com.intuit.tank.dao.ScriptDao.java

License:Open Source License

public SerializedScriptStep serialize(List<ScriptStep> steps) {
    ObjectOutputStream s = null;//from  ww w.  ja  v a2  s. c  o m
    try {
        // if (steps.size() > 0) {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        s = new ObjectOutputStream(bos);
        s.writeObject(steps);
        return new SerializedScriptStep(bos.toByteArray());
        // }
    } catch (IOException e) {
        throw new RecoverableException(e);
    } finally {
        IOUtils.closeQuietly(s);
    }
}