Make getLastError private