Kaydet (Commit) 0ec5a0d1 authored tarafından Cédric Bosdonnat's avatar Cédric Bosdonnat

Added some messages to exceptions to make them usable for debugging

üst aacf55db
...@@ -1794,7 +1794,9 @@ void SwXText::Impl::ConvertCell( ...@@ -1794,7 +1794,9 @@ void SwXText::Impl::ConvertCell(
{ {
if (rCell.getLength() != 2) 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> xStartRange = rCell[0];
const uno::Reference<text::XTextRange> xEndRange = rCell[1]; const uno::Reference<text::XTextRange> xEndRange = rCell[1];
...@@ -1807,7 +1809,9 @@ void SwXText::Impl::ConvertCell( ...@@ -1807,7 +1809,9 @@ void SwXText::Impl::ConvertCell(
if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) || if (!::sw::XTextRangeToSwPaM(aStartCellPam, xStartRange) ||
!::sw::XTextRangeToSwPaM(aEndCellPam, xEndRange)) !::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, SwNodeRange aTmpRange(aStartCellPam.Start()->nNode,
......
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