I am working on my own library for Android and I have two variables that need to be validated. The following variables are declared within one of my library classes.

`Boolean Decimals = false;
Boolean Separator = true;`

When developers use the library, if they set `Decimals = true` and `Separator = true`, I want to throw an error underlying the code lines displaying a message:

> 
> Decimals cannot be set as true when Separator is set as true`. 
> 
> 
> 

This is a form of validation I need in my library to avoid conflicts in certain functions.

How can I throw a library-level error after validating if these two variables are always set as opposites?

**NOTE**: Throwing it during runtime is not the desired behaviour. I would like to indicate it during the developer's coding process