From: Prakalathan Ponnusamy Date: Fri, 22 Mar 2013 13:18:07 +0000 (+0530) Subject: Modifying the exception as per the doxygen for GroupContainer X-Git-Tag: accepted/tizen_2.1/20130425.033138~756^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=891de8a0f44064a00219c213fa2e01f44c71dd18;p=platform%2Fframework%2Fnative%2Fuifw.git Modifying the exception as per the doxygen for GroupContainer Change-Id: I73b4ca10df99ee5c0c15d9469f78bb8bec30971e --- diff --git a/src/ui/controls/FUiCtrl_GroupContainer.cpp b/src/ui/controls/FUiCtrl_GroupContainer.cpp index 3cb30ea..9c5f499 100644 --- a/src/ui/controls/FUiCtrl_GroupContainer.cpp +++ b/src/ui/controls/FUiCtrl_GroupContainer.cpp @@ -280,7 +280,7 @@ _GroupContainer::AddControlAt(Control &control, int rowIndex, int columnIndex) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row or column index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); SysTryReturnResult(NID_UI_CTRL, (HasChild(rowIndex, columnIndex) == false), E_INVALID_OPERATION, "The control instance is already added in this index."); //Can't add in merged cells @@ -321,7 +321,7 @@ CATCH: Control* _GroupContainer::GetControlAt(int rowIndex, int columnIndex) { - SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), null, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Invalid row or column index."); + SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), null, E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); result r = E_SUCCESS; SysTryReturn(NID_UI_CTRL, (HasChild(rowIndex, columnIndex)), null, E_INVALID_OPERATION, "Control does not exist in the specified cell."); @@ -343,7 +343,7 @@ _GroupContainer::GetControlAt(int rowIndex, int columnIndex) result _GroupContainer::RemoveControlAt(int rowIndex, int columnIndex) { - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row or column index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); result r = E_SUCCESS; @@ -371,7 +371,7 @@ _GroupContainer::SetColumnWidth(int columnIndex, float width) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Column index should be non negative and less than total column count."); + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); SysTryReturnResult(NID_UI_CTRL, width >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Column width should be non negative."); int row = -1; @@ -439,7 +439,7 @@ _GroupContainer::SetColumnWidth(int columnIndex, float width) float _GroupContainer::GetColumnWidth(int columnIndex) { - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Column index should be non negative and less than total column count."); + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); return __pCellsArray[0][columnIndex].cellBounds.width; } @@ -448,7 +448,7 @@ _GroupContainer::SetRowHeight(int rowIndex, float height) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Row index should be non negative and less then total row count."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); SysTryReturnResult(NID_UI_CTRL, height >= 0, E_INVALID_ARG, "Invalid argument(s) is used. Row height should be non negative."); int row = -1; @@ -515,7 +515,7 @@ _GroupContainer::SetRowHeight(int rowIndex, float height) float _GroupContainer::GetRowHeight(int rowIndex) { - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Row index should be non negative and less than total row count."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); return __pCellsArray[rowIndex][0].cellBounds.height; } @@ -525,8 +525,8 @@ _GroupContainer::Merge(int rowStartIndex, int columnStartIndex, int rowCount, in int rowEndIndex = rowStartIndex + rowCount; int columnEndIndex = columnStartIndex + columnCount; - SysTryReturnResult(NID_UI_CTRL, (rowStartIndex >= 0 && rowStartIndex < __rowCount && rowEndIndex >= 0 && rowEndIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row start or end index."); - SysTryReturnResult(NID_UI_CTRL, (columnStartIndex >= 0 && columnStartIndex < __columnCount && columnEndIndex >= 0 && columnEndIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid column start or end index."); + SysTryReturnResult(NID_UI_CTRL, (rowStartIndex >= 0 && rowStartIndex < __rowCount && rowEndIndex >= 0 && rowEndIndex < __rowCount), E_OUT_OF_RANGE, "rowStartIndex(%d) or rowCount(%d) is out of range.", rowStartIndex, rowCount); + SysTryReturnResult(NID_UI_CTRL, (columnStartIndex >= 0 && columnStartIndex < __columnCount && columnEndIndex >= 0 && columnEndIndex < __columnCount), E_OUT_OF_RANGE, "columnStartIndex(%d) or columnCount(%d) is out of range.", columnStartIndex, columnCount); //If same combination of cells, return success if (__pCellsArray[rowStartIndex][columnStartIndex].isParent) @@ -630,7 +630,7 @@ _GroupContainer::SetChildResizingEnabled(int rowIndex, int columnIndex, bool ena { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row or column index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); if (__pCellsArray[rowIndex][columnIndex].parentCell.row == rowIndex && __pCellsArray[rowIndex][columnIndex].parentCell.column == columnIndex) @@ -659,7 +659,7 @@ _GroupContainer::SetMargin(int rowIndex, int columnIndex, float leftMargin, floa { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row or column index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); SysTryReturnResult(NID_UI_CTRL, (leftMargin >= 0.0f && rightMargin >= 0.0f && topMargin >= 0.0f && bottomMargin >= 0.0f), E_INVALID_ARG, "Invalid argument(s) is used. Invalid margin value."); @@ -706,7 +706,7 @@ _GroupContainer::GetBoundsAt(int rowIndex, int columnIndex) const ClearLastResult(); FloatRectangle rect(0.0f, 0.0f, -1.0f, -1.0f); - SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >=0 && rowIndex < __rowCount && columnIndex < __columnCount), rect, E_INVALID_ARG, "[E_INVALID_ARG] Invalid argument(s) is used. Invalid row or column index."); + SysTryReturn(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >=0 && rowIndex < __rowCount && columnIndex < __columnCount), rect, E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); rect.x = __pCellsArray[rowIndex][columnIndex].cellBounds.x; rect.width = __pCellsArray[rowIndex][columnIndex].cellBounds.width; @@ -723,8 +723,7 @@ _GroupContainer::Split(int rowIndex, int columnIndex) int rowEndIndex = -1; int columnEndIndex = -1; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row start index."); - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid column start index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >=0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); if (__pCellsArray[rowIndex][columnIndex].isParent) { @@ -777,7 +776,7 @@ _GroupContainer::GetLineWidth(void) result _GroupContainer::SetColumnStretchable(int columnIndex, bool stretchable) { - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Column index should be non negative and less than total column count."); + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); if (stretchable) { @@ -794,7 +793,7 @@ _GroupContainer::SetColumnStretchable(int columnIndex, bool stretchable) bool _GroupContainer::IsColumnStretchable(int columnIndex) { - SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Column index should be non negative and less than total column count."); + SysTryReturnResult(NID_UI_CTRL, (columnIndex >= 0 && columnIndex < __columnCount), E_OUT_OF_RANGE, "columnIndex(%d) is out of range.", columnIndex); return __pStretchableColumnIndex[columnIndex]; } @@ -802,7 +801,7 @@ _GroupContainer::IsColumnStretchable(int columnIndex) result _GroupContainer::SetRowStretchable(int rowIndex, bool stretchable) { - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Row index should be non negative and less than total row count."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); if (stretchable) { @@ -819,7 +818,7 @@ _GroupContainer::SetRowStretchable(int rowIndex, bool stretchable) bool _GroupContainer::IsRowStretchable(int rowIndex) { - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_INVALID_ARG, "Invalid argument(s) is used. Row index should be non negative and less than total row count."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && rowIndex < __rowCount), E_OUT_OF_RANGE, "rowIndex(%d) is out of range.", rowIndex); return __pStretchableRowIndex[rowIndex]; } @@ -841,7 +840,7 @@ _GroupContainer::ResizeControl(int rowIndex, int columnIndex) { result r = E_SUCCESS; - SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_INVALID_ARG, "Invalid argument(s) is used. Invalid row or column index."); + SysTryReturnResult(NID_UI_CTRL, (rowIndex >= 0 && columnIndex >= 0 && rowIndex < __rowCount && columnIndex < __columnCount), E_OUT_OF_RANGE, "rowIndex(%d) or columnIndex(%d) is out of range.", rowIndex, columnIndex); if (__pCellsArray[rowIndex][columnIndex].isResizeEnabled == true) { @@ -941,7 +940,7 @@ _GroupContainer::GetControlCoreAt(int rowIndex, int columnIndex) if (!pControl) { - SysLogException(NID_UI, E_SYSTEM, "[E_SYSTEM] A system error has occurred. Failed to get control at specified index."); + SysLogException(NID_UI, E_OPERATION_FAILED, "[E_OPERATION_FAILED] Failed to get control at specified index."); } return pControl;