> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> 이 함수는 예외 안전성을 테스트하는 데 사용할 수 있습니다. 지정된 확률로 생성 시 예외를 발생시킵니다.

# aggThrow

<div id="aggThrow">
  ## aggThrow
</div>

도입 버전: v20.1.0

이 함수는 예외 안전성을 테스트하는 데 사용할 수 있습니다. 지정된 확률에 따라 생성될 때 예외를 발생시킵니다.

**구문**

```sql theme={null}
aggThrow(throw_prob)
```

**인수**

* `throw_prob` — 생성 시 예외를 발생시킬 확률입니다. [`Float64`](/ko/reference/data-types/float)

**반환 값**

다음 예외를 반환합니다: `Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully`.

**예시**

**사용 예시**

```sql title=Query theme={null}
SELECT number % 2 AS even, aggThrow(number) FROM numbers(10) GROUP BY even;
```

```response title=Response theme={null}
Received exception:
Code: 503. DB::Exception: Aggregate function aggThrow has thrown exception successfully: While executing AggregatingTransform. (AGGREGATE_FUNCTION_THROW)
```
