This is a puppet specific error class, intended to resolve the windows last error code. You'll need to bring that error class over, or just raise a different error.