# Throw exception in elasticsearch from groovy

**URL:** <https://discuss.elastic.co/t/throw-exception-in-elasticsearch-from-groovy/35934>\
**Category:** Elasticsearch\
**Created:** [November 30, 2015, 5:58pm UTC](https://discuss.elastic.co/t/throw-exception-in-elasticsearch-from-groovy/35934 "2015-11-30T17:58:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Max\_Just](https://avatars.discourse-cdn.com/v4/letter/m/e79b87/32.png) [@Max\_Just](https://discuss.elastic.co/u/Max_Just)\
**Post date:** [November 30, 2015, 5:58pm UTC](https://discuss.elastic.co/t/throw-exception-in-elasticsearch-from-groovy/35934/1 "2015-11-30T17:58:36Z")

</div>

Hi everybody, is it possible to log groovy script errors and/or warning?  
Or maybe throw a java exception from groovy script, to catch error?

UPDATE: Not actual any more. Problem was in logstash output plugin, not in elasticseach.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:33pm UTC](https://discuss.elastic.co/t/throw-exception-in-elasticsearch-from-groovy/35934/2 "2017-07-05T23:33:58Z")

</div>

Closed on July 5, 2017, 11:33pm UTC


