According to MSDN, it said that it is better to add the vbObjectError to the err.number in the err.raise.
=======================================================
i.e. <Assume error occur, and on error goto E:>
E:
lngErrorNumber = err.number
err.raise vbObjectError + lngErrorNumber
=======================================================
However, I have some cascade classes that can propagate a error from a class to another class, if I still add the vbObjectError in another class, it will prompt overflow because vbObjectError+vbObjectError is larger than the range of the Long data type.
Therefore, I would like to ask can I omit the plus vbObjectError during err.raise?
=======================================================
e.g.
E:
lngErrorNumber = err.number
err.raise lngErrorNumber
=======================================================
Any side effect about this?
=======================================================
i.e. <Assume error occur, and on error goto E:>
E:
lngErrorNumber = err.number
err.raise vbObjectError + lngErrorNumber
=======================================================
However, I have some cascade classes that can propagate a error from a class to another class, if I still add the vbObjectError in another class, it will prompt overflow because vbObjectError+vbObjectError is larger than the range of the Long data type.
Therefore, I would like to ask can I omit the plus vbObjectError during err.raise?
=======================================================
e.g.
E:
lngErrorNumber = err.number
err.raise lngErrorNumber
=======================================================
Any side effect about this?