1864 |
int end) |
int end) |
1865 |
{ |
{ |
1866 |
super(parent, attributes); |
super(parent, attributes); |
|
try |
|
1867 |
{ |
{ |
1868 |
startPos = parent.getDocument().createPosition(start); |
try |
1869 |
endPos = parent.getDocument().createPosition(end); |
{ |
1870 |
} |
if (parent != null) |
1871 |
catch (BadLocationException ex) |
{ |
1872 |
{ |
startPos = parent.getDocument().createPosition(start); |
1873 |
throw new AssertionError("BadLocationException must not be thrown " |
endPos = parent.getDocument().createPosition(end); |
1874 |
+ "here. start=" + start + ", end=" + end |
} |
1875 |
+ ", length=" + getLength()); |
else |
1876 |
|
{ |
1877 |
|
startPos = createPosition(start); |
1878 |
|
endPos = createPosition(end); |
1879 |
|
} |
1880 |
|
} |
1881 |
|
catch (BadLocationException ex) |
1882 |
|
{ |
1883 |
|
AssertionError as; |
1884 |
|
as = new AssertionError("BadLocationException thrown " |
1885 |
|
+ "here. start=" + start |
1886 |
|
+ ", end=" + end |
1887 |
|
+ ", length=" + getLength()); |
1888 |
|
as.initCause(ex); |
1889 |
|
throw as; |
1890 |
|
} |
1891 |
} |
} |
1892 |
} |
} |
1893 |
|
|