The IASPError::get_LineNumber method returns a LONG containing the line number of the code that generated the error.
HRESULT get_LineNumber( LONG *plLineNumber // pointer to a LONG for the line number that generated the error
);