Ignoring an errorlevel != 0 in Windows PowerShell (ISE)
This doesn't have anything to do with the exit code returned by the EXE. An error is generated when an EXE writes to stderr, but only within the ISE or when remoting or using background jobs.
An EXE that writes to stderr does not generate errors from the regular PowerShell command prompt. I'm not sure why this is the case.
Actually, the application ran fine - PowerShell is mistaken in reporting an error.
When an application prints to standard error, PowerShell will sometimes conclude that application has failed. This is actually a design decision made by PowerShell developers. IMHO, this is a mistake, because many reliable applications (such as curl) print useful information to standard error in the course of normal operation. The consequence is that PowerShell only plays well with other PowerShell scripts and can't be relied on to interoperate with other applications.
Other readers in this thread had difficulty reproducing the behaviour because PowerShell implements it inconsistently. Whether the NativeCommandError occurs depends on how standard error is redirected (as a consequence the bug occurs in vanilla PowerShell ISE, but not vanilla PowerShell).
Whatever your opinion of the design decision in the first paragraph, the inconsistent implementation is for certain a PowerShell bug - see $LastExitCode=0 but $?=False in PowerShell. Redirecting stderr to stdout gives NativeCommandError.