# Default Exit value and command line options

**URL:** <https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600>\
**Category:** Integrating mothur with other programs\
**Created:** [December 4, 2013, 4:06pm UTC](https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600 "2013-12-04T16:06:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hiwi](https://avatars.discourse-cdn.com/v4/letter/h/bcef8e/32.png) [@Hiwi](https://forum.mothur.org/u/Hiwi)\
**Post date:** [December 4, 2013, 4:06pm UTC](https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600/1 "2013-12-04T16:06:38Z")

</div>

Hi,

What is the default exit value of mothur if everything runs fine?

Are there some command line arguments I can specify?

Regards,

TL

---

<div class="post-metadata">

**Author:** ![westcott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.mothur.org/westcott/32/18_2.png) [@westcott](https://forum.mothur.org/u/westcott)\
**Post date:** [December 4, 2013, 5:07pm UTC](https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600/2 "2013-12-04T17:07:40Z")

</div>

Mothur does not have a error return code programmed in. We report errors in “human” form to the logfile and the screen. The error tag is [ERROR]. If you are searching a log file, it is also helpful to search for the quit command. If you don’t find it, that can indicate an error. Failure to find a quit command, usually indicate an error that caused a crash of mothur that bypassed our try catches, :oops: .

---

<div class="post-metadata">

**Author:** ![Hiwi](https://avatars.discourse-cdn.com/v4/letter/h/bcef8e/32.png) [@Hiwi](https://forum.mothur.org/u/Hiwi)\
**Post date:** [December 4, 2013, 5:20pm UTC](https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600/3 "2013-12-04T17:20:26Z")

</div>

Hi,

> Mothur does not have a error return code programmed in.

Hmmm I guess you don’t set one explicitly. Every program ( for unix/windows os ) returns an integer when the programm finished( by executing the last statement or by an error or cancelation ).

I use a special library for communicating with mothur ( ApacheCommons Exec ). There you can specify an integer for the app you want to start which the app returns when finishing( “normal” → without errors ).  
I set this integer to 1 - which is the default return value for many applications if they finished correctly.

Regards,  
TL

---

<div class="post-metadata">

**Author:** ![Hiwi](https://avatars.discourse-cdn.com/v4/letter/h/bcef8e/32.png) [@Hiwi](https://forum.mothur.org/u/Hiwi)\
**Post date:** [December 5, 2013, 2:03pm UTC](https://forum.mothur.org/t/default-exit-value-and-command-line-options/1600/4 "2013-12-05T14:03:11Z")

</div>

Re,

> I set this integer to 1 - which is the default return value for many applications

:oops:  
This is not true. I mixed something up … so I saw that you provide 0 as the default return code for a normal program termination.

Sorry,

TL
