Updated from PR comments

-Changed name of compactError to compactWithError
-Changed return type from void to BOOL for compactWithError