Kaydet (Commit) cc4f4e20 authored tarafından Caolán McNamara's avatar Caolán McNamara

catch UnknownPropertyException

Change-Id: I3134c574a124a2359c40b139eb5b41198b0e4611
üst 4a1888a9
......@@ -25,6 +25,7 @@ import com.sun.star.awt.Point;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.accessibility.AccessibleTextType;
import com.sun.star.accessibility.TextSegment;
import com.sun.star.beans.UnknownPropertyException;
import com.sun.star.uno.XInterface;
import com.sun.star.uno.UnoRuntime;
......@@ -235,6 +236,9 @@ public class _XAccessibleText {
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
System.out.println("Expected exception");
res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
System.out.println("unexpected exception => FAILED");
res &= false;
}
try {
......@@ -245,6 +249,9 @@ public class _XAccessibleText {
} catch(com.sun.star.lang.IndexOutOfBoundsException e) {
System.out.println("Expected exception");
res &= true;
} catch(com.sun.star.beans.UnknownPropertyException e) {
System.out.println("unexpected exception => FAILED");
res &= false;
}
try {
......@@ -257,6 +264,9 @@ public class _XAccessibleText {
System.out.println("Unexpected exception");
e.printStackTrace();
res &= false;
} catch(com.sun.star.beans.UnknownPropertyException e) {
System.out.println("unexpected exception => FAILED");
res &= false;
}
return res;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment