# I have a build_cmake.bat file, anyway to propagate errors and build failure to my jenkinsfile?


For a while now our build showed as passing but it was actually failing

Any way to integrate bat files to propagate errors and failures to jenkinsfile?

My simple script for reference

```less
@echo off

cd .\app\Service\
cmake --build --preset=build-x86-release
cd ..\..\

pause
```

in jenkinsfile I have:

```less
//Stage 16: Start build
                    stage('Build') {
                        if (env.BUILD_CONFIGURATION == 'win64_release') {
                            cmd_from_file('cmake-build-x64')
                        } else if (env.BUILD_CONFIGURATION == 'win32_release') {
                            cmd_from_file('cmake-build-x86')
                        } else {
                            error "Unknown BUILD_CONFIGURATION: ${env.BUILD_CONFIGURATION}"
                        }
                    }
```
