[GH-ISSUE #49] exception not handled well #32

Closed
opened 2026-02-26 17:32:14 +03:00 by kerem · 1 comment
Owner

Originally created by @schelte44 on GitHub (Feb 4, 2026).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/49

What happened?

In the current function IsNumeric, an error is introduced on the global error stack when non numeric values are tested. A more convenient way would be for example (I gemini'd it..):

function IsNumeric([string]$x) {
return ($x -as [double]) -ne $null
}

Expected behavior

IsNumeric should not put errors on the error stack

Relevant log output


Proxmox VE Version

9.1

Module Version

9.1.1

PowerShell Version

7.5.4

Version (working)

No response

On what operating system are you experiencing the issue?

Windows

Pull Request

  • I would like to do a Pull Request
Originally created by @schelte44 on GitHub (Feb 4, 2026). Original GitHub issue: https://github.com/Corsinvest/cv4pve-api-powershell/issues/49 ### What happened? In the current function IsNumeric, an error is introduced on the global error stack when non numeric values are tested. A more convenient way would be for example (I gemini'd it..): function IsNumeric([string]$x) { return ($x -as [double]) -ne $null } ### Expected behavior IsNumeric should not put errors on the error stack ### Relevant log output ```shell ``` ### Proxmox VE Version 9.1 ### Module Version 9.1.1 ### PowerShell Version 7.5.4 ### Version (working) _No response_ ### On what operating system are you experiencing the issue? Windows ### Pull Request - [ ] I would like to do a Pull Request
kerem 2026-02-26 17:32:14 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@franklupo commented on GitHub (Feb 6, 2026):

We are checking the problem thanks

<!-- gh-comment-id:3861811432 --> @franklupo commented on GitHub (Feb 6, 2026): We are checking the problem thanks
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-api-powershell#32
No description provided.