1
$\begingroup$

While running a .wls file from the command line using wolframscript, is there a way to get the error messages printed to the command line?

$\endgroup$
  • 1
    $\begingroup$ something like Print[$MessageList]? $\endgroup$ – user42582 May 22 at 20:54
  • $\begingroup$ @user42582 I tried implementing this without success, even when intentionally putting errors in that are shown using the GUI I am simply getting {} returned. However, the notebook being run is being used to open other notebooks that have the errors, so the error messages might be lost between the two. I will try implementing this in different places and see what I can turn up. $\endgroup$ – BOUNCE May 22 at 21:21
  • $\begingroup$ I'm slightly confused; your original question didn't mention anything about a GUI; are you using Manipulate or DynamicModule? a quick suggestion would be to queue the messages from different sources and present them after all code has finished evaluating; obviously, this begs the question of how your code is structured; I would urge you to provide a small scale working example of the code so that anyone willing to assist will have a concrete instance of the problem at hand $\endgroup$ – user42582 May 23 at 6:52
  • $\begingroup$ @user42582 by gui I simply meant the mathematica front end. I did however find a way to do this : EvaluationData[] seemed to do the trick, however I wish I could figure out how to do it without all the extra metadata $\endgroup$ – BOUNCE May 23 at 18:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.