throw new PtyException("winpty agent cfg is null"); if (winpty == null) { WString errMsg = INSTANCE.winpty_error_msg(errPtr.getValue()); throw new PtyException("Error starting winpty: " + errMsg.toString()); null); if (spawnCfg == null) { throw new PtyException("winpty spawn cfg is null"); throw new PtyException("Error running process: " + errMsg.toString() + ". Code " + errCode.getValue());