Java tutorial
/** * Copyright (c) 2005-2011 springside.org.cn * * Licensed under the Apache License, Version 2.0 (the "License"); * * $Id: Fixtures.java 1593 2011-05-11 10:37:12Z calvinxiu $ */ package com.mawujun.utils; public class ExceptionUtils extends org.apache.commons.lang3.exception.ExceptionUtils { /** * CheckedException?UnCheckedException. */ public static RuntimeException unchecked(Exception e) { if (e instanceof RuntimeException) { return (RuntimeException) e; } return new RuntimeException(e.getMessage(), e); } }