--- /dev/null
+import java.io.IOException;
+
+public aspect Pr103097 {
+ declare soft: IOException:
+ within(Pr103097) &&
+ !withincode(* *(..)) &&
+ !call(* *(..));
+
+ before() : execution(* main(..)) {
+ try {
+ doThrow();
+ } catch (IOException e) {
+ throw new RuntimeException("IOException not softened as expected");
+ } catch(org.aspectj.lang.SoftException ex) {}
+ }
+
+ public static void doThrow() throws IOException {
+ throw new IOException("test");
+ }
+
+ public static void main(String args[]) {
+ }
+}
\ No newline at end of file
<ajc-test dir="bugs150" title="declare soft and adviceexecution" pr="103051">
<compile files="Pr103051.aj" options="-Xdev:Pinpoint"/>
</ajc-test>
-
+
+ <ajc-test dir="bugs150" title="declare soft and exclusions" pr="103097">
+ <compile files="Pr103097.aj"/>
+ <run class="Pr103097"/>
+ </ajc-test>
+
<ajc-test dir="bugs150/pr114436" title="ClassFormatError binary weaving perthis">
<compile files="SimpleTrace.aj,ConcreteSimpleTracing.aj" outjar="aspects.jar"/>
<compile files="TestClass.java" aspectpath="aspects.jar"/>