# Getting wolframscript to print out error messages?

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?

• something like Print[\$MessageList]? – user42582 May 22 at 20:54
• @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. – BOUNCE May 22 at 21:21
• 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 – user42582 May 23 at 6:52
• @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 – BOUNCE May 23 at 18:55