# PetscOptionsReject
Generates an error if a certain option is given. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscOptionsReject(PetscOptions options, const char pre[], const char name[], const char mess[])
```
Not Collective


## Input Parameters

- ***options -*** options database, use NULL for default global database
- ***pre -*** the option prefix (may be NULL)
- ***name -*** the option name one is seeking
- ***mess -*** error message (may be NULL)





## See Also
 `PetscOptionsGetInt()`, `PetscOptionsGetReal()`, `OptionsHasName()`,
`PetscOptionsGetString()`, `PetscOptionsGetIntArray()`, `PetscOptionsGetRealArray()`, `PetscOptionsBool()`,
`PetscOptionsName()`, `PetscOptionsBegin()`, `PetscOptionsEnd()`, `PetscOptionsHeadBegin()`,
`PetscOptionsStringArray()`, `PetscOptionsRealArray()`, `PetscOptionsScalar()`,
`PetscOptionsBoolGroupBegin()`, `PetscOptionsBoolGroup()`, `PetscOptionsBoolGroupEnd()`,
`PetscOptionsFList()`, `PetscOptionsEList()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/options.c.html#PetscOptionsReject">src/sys/objects/options.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/options.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
