[header] How to dismiss a civil lawsuit [title] Determine if the court has proper jurisdiction over the subject matter of the lawsuit. [step] If the court where the lawsuit was filed does not have the power to decide the type of claim asserted in the lawsuit, you can request that the lawsuit be dismissed. [substeps] For example, many states have separate family courts to decide family law cases such as custody and divorce. 
If your spouse files for divorce in a general civil court, you would have an argument that she'd filed in the wrong court. In some cases, the court itself will dismiss the lawsuit if there is obviously no jurisdiction.