trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <>
Subject [GitHub] trafodion pull request #1504: [TRAFODION-3009] Streamline error handling in ...
Date Tue, 03 Apr 2018 20:15:30 GMT
Github user selvaganesang commented on a diff in the pull request:
    --- Diff: core/sql/exp/ExpError.cpp ---
    @@ -135,6 +135,20 @@ ComDiagsArea *ExRaiseSqlError(CollHeap* heap, ComDiagsArea** diagsArea,
     			intParam1, intParam2, intParam3, 
     			stringParam1, stringParam2, stringParam3);
    +ComDiagsArea *ExRaiseSqlError(CollHeap* heap, ComDiagsArea** diagsArea,
    --- End diff --
    This function is modeled after other ExRaiseSqlError functions already in this file. 
I wasn't sure how ComDiagsArea would be passed to the callers of ExRaiseSqlError, meaning
if it would exist or not.  If the ComDiagsArea is passed to the caller as a parameter to itself
and then it would be become recursive change to ensure that all the function in the chain
passes reference pointers.
     The existing ExRaiseSqlError excepts the enum ExeErrorCode needs to be updated to raise
sql error correctly.  However, with the embedded arkcmp concepts, even the non-executor error
codes needs to be passed to this function.  Casting to enum ExeErrorCode when the code doesn't
exist in it causes unexpected value. Hence this new function was introduced to raise sql error.
Earlier, the code assumed that diagsArea is always allocated and populated it.


View raw message