diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java index 7e70830a98..ed7ce56443 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2015 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -214,7 +214,14 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner { notifier.fireTestIgnored(description); } else { - runLeaf(methodBlock(frameworkMethod), description, notifier); + Statement statement; + try { + statement = methodBlock(frameworkMethod); + } + catch (Throwable ex) { + statement = new Fail(ex); + } + runLeaf(statement, description, notifier); } }