List of usage examples for java.lang Exception Exception
public Exception()
From source file:com.trenako.web.controllers.ErrorControllerTests.java
@Test public void shouldShowJustTheErrorPageForRemoteClients() { MockHttpServletRequest request = mockRequest("173.194.35.50", new Exception()); ModelAndView mav = controller.resolveException(request); assertViewName(mav, "error/error"); }
From source file:com.Services.Impl.PlayerList.SoccerList_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public soccer_list merge(soccer_list entity) { if (entity == null) { try {/* ww w . j av a2 s . c o m*/ throw new Exception(); } catch (Exception ex) { Logger.getLogger(SoccerList_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.Services.Impl.Players.SoccerPlayer_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public Soccer_player merge(Soccer_player entity) { if (entity == null) { try {/*from www . j a va 2s .c o m*/ throw new Exception(); } catch (Exception ex) { Logger.getLogger(SoccerPlayer_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.Services.Impl.PlayerRecords.Bowler_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public BowlerWickets merge(BowlerWickets entity) { if (entity == null) { try {//from w ww . j a va2 s . c o m throw new Exception(); } catch (Exception ex) { Logger.getLogger(Bowler_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.Services.Impl.SportRecords.RugbyRecords_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public Rugby_Records merge(Rugby_Records entity) { if (entity == null) { try {//ww w . j a v a2 s. c o m throw new Exception(); } catch (Exception ex) { Logger.getLogger(RugbyRecords_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.Services.Impl.PlayerRecords.GoalScorer_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public goal_Scorers merge(goal_Scorers entity) { if (entity == null) { try {//ww w.j a va 2 s. c o m throw new Exception(); } catch (Exception ex) { Logger.getLogger(GoalScorer_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.Services.Impl.SportRecords.CricketRecords_CrudImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public Cricket_records merge(Cricket_records entity) { if (entity == null) { try {// w ww .j a va 2 s.c o m throw new Exception(); } catch (Exception ex) { Logger.getLogger(CricketRecords_CrudImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.juhuasuan.osprey.ProcessorUtil.java
public void registerProcessor(OspreyProcessor<?> processor) { if (null != processors.putIfAbsent(processor.interest(), processor)) { LOGGER.warn("Register Processor[" + processor.interest() + ", " + processor + "].", new Exception()); }/*from w w w .j a v a 2 s. c o m*/ }
From source file:com.Services.Impl.Employees.CoachCrudServiceImpl.java
@Override @Transactional(propagation = Propagation.REQUIRES_NEW) public Coach merge(Coach entity) { if (entity == null) { try {/*w w w.j a v a2 s. c o m*/ throw new Exception(); } catch (Exception ex) { Logger.getLogger(CoachCrudServiceImpl.class.getName()).log(Level.SEVERE, null, ex); } } return entity; }
From source file:com.biglakesystems.biglib.quality.ExceptionsTest.java
/** * Test the implementation of {@link Exceptions#uniqueId(Throwable)}. *//*from ww w.ja v a2 s. co m*/ @Test public void testUniqueId() { /* Verify that repeated calls with the same instance return the same identifier. */ final Exception testException = new Exception(); final String testExceptionId = Exceptions.uniqueId(testException); assertTrue(StringUtils.isNotBlank(testExceptionId)); assertEquals(testExceptionId, Exceptions.uniqueId(testException)); assertFalse(testExceptionId.equals(Exceptions.uniqueId(new Exception()))); /* Verify that two different exception objects, which are equal per equals()/hashCode(), do not yield the same identifier. */ final Throwable equalException1 = new AlwaysEqualException(); final Throwable equalException2 = new AlwaysEqualException(); assertEquals(equalException1, equalException2); assertFalse(Exceptions.uniqueId(equalException1).equals(Exceptions.uniqueId(equalException2))); }