Any time a geometry error is issued, ZEMAX stores the position and direction cosine information of that ray.  These starting values may be used to create a single Source Ray that duplicates the ray with the error.  Anytime a geometry error is issued, you may ask ZEMAX to generate this source ray from under the Tools menu of the NSC Editor:

Create Source Ray From Last Geometry Error Tool

Upon selecting this option, ZEMAX will generate a Source Ray automatically in your NSC Editor with the appropriate position and direction cosines, and turn all of your other sources off by setting the # Layout Rays and # Analysis Rays to zero.

Geometry Error Test Ray in NSC Editor

Once the Geometry Error Test Ray is in place, you may use the layouts, ZEMAX Ray Database Viewer, and other diagnostic tools to narrow down the cause for the invalid ray trace.  In doing this, it will be helpful to temporarily turn ON the Ignore Errors flag, so that you are not continually issued an error message every time you rotate a plot or move your cursor within the editor:

Ignore Errors Option

Note that this a global switch, and it is tied to the Ignore Errors checkbox in the Ray Trace/Detector Control window:

Ignore Errors flag in Detector Control Dialog

To save and view the details of a ray trace, choose Ignore Errors and save the rays to a desired filename (using the .ZRD extension). 

Within the Ray Database (Analysis > Database > Ray Database Viewer), you can view the all of the details of the propagation of the ray, right up to the point in which the error was experienced (denoted by the * in the Z column).  This way you can determine the object the ray hit when terminated, the face number of that object, and the entire propagation history.  This is very useful in targeting the area of your setup which needs modification in order to proceed without error.

Ray Database Viewer