public static function errorToString($error) {
        if (!is_int($error)) throw new IllegalTypeException('Illegal type of parameter $error: '.gettype($error));

        if (key_exists($error, self::$win32Errors))
            return self::$win32Errors[$error][0];
        return (string) $error;
    }