1

I would like to add a warning that shows up like the "Main Thread Checker" in the Issue Navigator under the Runtime tab.

I have used assert() in the past but I don't want to cause a crash, just note the issues in the navigator.

I want the error to only show if the code is run and not at compile time.

Maybe the answer is that one doesn't exist?

1 Answers1

-2
#warning("My message")

#error("Some Error")

I use this feature frequently to mark some TODOs: #warning("TODO: Some work")

Stefan Wieland
  • 246
  • 2
  • 4
  • 3
    I'm looking for a *Runtime* warnings / errors, those are compile time errors – Bobby Rohweder Apr 16 '20 at 08:16
  • @BobbyRohweder You said you wanted the message to show in the Issues Navigator which is where compiler warning/error messages are displayed. Perhaps you could specify your requirements more accurately. – trojanfoe Apr 16 '20 at 08:24
  • 1
    Im sorry, I was trying to be clear with `under the Runtime tab`, where the main thread checker reports them. – Bobby Rohweder Apr 16 '20 at 08:27