summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-11-04 12:23:09 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2011-11-08 17:05:19 +0100
commit0ec5a0d1829ee201bc634699fc19259bfd6ffd10 (patch)
tree6fcd82d9bfd26c4e8a8987a82c14ce8e10589732 /sw
parentaacf55dbe004ae3cad720002d40dc0e408107fd3 (diff)
Added some messages to exceptions to make them usable for debugging
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/unocore/unotext.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 594c3cf2d159..2886b369e2d4 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1794,7 +1794,9 @@ void SwXText::Impl::ConvertCell(
{
if (rCell.getLength() != 2)
{
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException(
+ rtl::OUString::createFromAscii( "rCell needs to contain 2 elements" ),
+ uno::Reference< text::XTextCopy >( &m_rThis ), sal_Int16( 2 ) );
}
const uno::Reference<text::XTextRange> xStartRange = rCell[0];
const uno::Reference<text::XTextRange> xEndRange = rCell[1];
@@ -1807,7 +1809,9 @@ void SwXText::Impl::ConvertCell(
if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) ||
!::sw::XTextRangeToSwPaM(aEndCellPam, xEndRange))
{
- throw lang::IllegalArgumentException();
+ throw lang::IllegalArgumentException(
+ rtl::OUString::createFromAscii( "Start or End range cannot be resolved to a SwPaM" ),
+ uno::Reference< text::XTextCopy >( &m_rThis ), sal_Int16( 2 ) );
}
SwNodeRange aTmpRange(aStartCellPam.Start()->nNode,