Enhanced Error Management in 4D Code