# Exit error

Exit error 문은 스크립트 실행을 종료하고 사용자 정의 스크립트 오류를 발생시킵니다.

Exit Error expression [(when | unless condition)]

Exit error은(는) 제어 문이므로 세미콜론이나 줄 끝으로 끝나야 하며 줄 경계를 넘어서는 안 됩니다.

인수

| 인수 | 설명 |
| --- | --- |
| expression | 평가되어 사용자가 발생시킨 스크립트 오류 메시지로 반환되는 값입니다. |
| when / unless condition | 선택적 조건입니다. 조건이 참일 때 when은 오류를 발생시킵니다. 조건이 거짓일 때 unless는 오류를 발생시킵니다. |

```
//Exit error
Exit Error 'Load validation failed';
```

```
//Exit error when a condition is fulfilled
Exit Error 'Source connection unavailable' when vConnectionOk=0;
```

```
//Exit error unless a condition is fulfilled
Exit Error 'Required variable is missing' unless len(trim(vRequiredVar))>0;
```

[시각화에서 차트 수준 스크립팅 사용](https://help.qlik.com/ko-KR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/chart-level-scripting.htm)

[Exit](https://help.qlik.com/ko-KR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/Exit.htm)

[Exit script](https://help.qlik.com/ko-KR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/ControlStatements/exit-script.htm)

[제어 문](https://help.qlik.com/ko-KR/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartLevelScripting/modifier-control-statements.htm)