How to find error in my code when the error message is pointing to WP core file?

I figured out what was causing this, but it was by trial and error since there was no good debug info. And the error was in the main (custom post calling) part of my plugin, NOT in the options as I had surmised earlier. I ended up finding out that I needed to be using

'content'  => $p->post_content

in my query/foreach loop in place of

'content'  => get_the_content($p->ID)

and that the error line in the original debug (line 289) was failing on a function called “get_the_content” (ie, the one I was using), which ended up being clear after the fact (although it would have been nice if that particular line in my code had been indicated in the debug). Anyway, this would not work without a global $post variable, which caused all kinds of other content problems. But simply pulling the content directly (instead of via the get_the_content function) has solved my issue. Hope this helps someone else.