For example

Using mental illness as a defence can mean that the court applies a restriction order that will prevent you from leaving hospital.