Questions tagged [message-coding]

Questions about coding the generation of Messages and about the Message subsystem itself.

Filter by
Sorted by
Tagged with
0 votes
2 answers
30 views

How to preserve the state of messages across a block?

Is there a way to inquire whether a given message is switched On or Off without modifying the ...
Kuba hasn't forgotten Monica's user avatar
1 vote
0 answers
58 views

A cryptic message when converting a Graph to Graphics

In Mathematica 13.3 (Windows 11) I do Graph[{1, 2}, 1 \[UndirectedEdge] 2] then right-click on the result and choose "Convert To Graphics" from the menu ...
მამუკა ჯიბლაძე's user avatar
3 votes
3 answers
154 views

How to express Error Message as 'Output Cell'?

I got a random error message. expr = N[Pi, a] expr = Sin[x, The error message does not appear in the 'Output Cell'. ...
Milk's user avatar
  • 1,638
-1 votes
1 answer
79 views

How to make a button to delete a message output cell?

I got an error message about the following inputs. Sin[x,y] N[Pi, a] There are two things I want. (1) Creating a button to delete all message output cells (2) ...
Milk's user avatar
  • 1,638
0 votes
2 answers
110 views

How to find codewords from constraint equations? [closed]

I have edited this question to include more information about what algorithm I wish to use etc. Say if I have a linear binary code with parity check matrix $$H = \begin{bmatrix} 0 & 1 & 1 &...
am567's user avatar
  • 491
1 vote
0 answers
38 views

Message converts argument to string before formatting it

How to pass automatically, context-dependently formatted arguments to Message? Interestingly, StringForm correctly interprets ...
István Zachar's user avatar
1 vote
3 answers
204 views

Problem with NonlinearModelFit in the case of ODE

I am asking for your help for fitting a nonlinear ODE to data which are unknown up to a multiplicative constant k. So the constant k appears both in the data, and in the model, where it ...
Rim ADENANE's user avatar
1 vote
1 answer
56 views

Mask failure message in GeoPosition?

I am trying to construct a variable in a dataset that calculates the distance from a point to a city/country listed in another variable. I hoped to use GeoPosition to get the approximate location of ...
Stephen Sheppard's user avatar
0 votes
1 answer
129 views

Runge-Kutta of order 4 to solve m first order IVPs using Mathematica [duplicate]

I have the following m first-order IVPs d(y1)/dx=f1(x,y1,…,ym), y1(x0)=y10, d(y2)/dx=f2(x,y1,…,ym), y2(x0)=y20, ⋮ ...
Osama's user avatar
  • 13
2 votes
1 answer
86 views

Is there a comprehensive list of most common or most important native Message-s (w/tags) for errors and Failed?

Yes I understand how to use Messages[symbol] but that doesn't help much. I have no idea which important ones I may have missed in my search or even how many exist. ...
Jules Manson's user avatar
  • 2,437
5 votes
0 answers
198 views

What do “Analyze Notebook" and "Analyze Cells" Do?

What does "Analyze Notebook" and "Analyze Cells" do? They seem to, at least, point out some coding errors that are already highlighted in a notebook. Do they do anything else? Is ...
Just Some Old Man's user avatar
2 votes
1 answer
52 views

Why is Style ignored in my custom Echo error function?

To highlight the type of error that occurred the function echoError (via err) should display type of error in color: ...
Jules Manson's user avatar
  • 2,437
1 vote
0 answers
46 views

Is it possible to trigger some Mathematica code when an error of the type StringTake::take happens?

I process data from various sources (databases) that are formatted very inconsistently. I would like to be able to process them finally summarized in one piece. My code consists of many cases of ...
Adalbert Hanßen's user avatar
5 votes
1 answer
182 views

Print a Message

Is there a way to Print a message suitable for Message? I want to recycle some messages (but ...
Chris K's user avatar
  • 20.1k
3 votes
1 answer
57 views

Avoid MachinePrecision numbers in Message

Can I change the output of Message to not show MachinePrecision numbers? E.g. ...
Chris K's user avatar
  • 20.1k
3 votes
2 answers
106 views

Information/Information`InformationValueForm using Full- or InputForm

I have a problem with the build-in Information function for user-defined symbols with custom StandardForm in Mathematica 12.1.1.0: For example with the function ...
N0va's user avatar
  • 3,360
6 votes
1 answer
210 views

how to obtain all Messages for Mathematica build-in functions?

Help says Messages[symbol] gives all the messages assigned to a particular symbol. These are called message identifiers per help: Message names always consist of ...
Nasser's user avatar
  • 142k
7 votes
3 answers
2k views

How to implement try/catch/end try in Mathematica in the most simple way?

There are lots of question/answers about exception handling in Mathematica. I still find exception handling in Mathematica too complicated to work with. I find Maple much simpler and easier to ...
Nasser's user avatar
  • 142k
7 votes
1 answer
138 views

Clearing ::usage message

After having assigned the usage message to f using ClearAll@f; f::usage=ToString@RandomInteger@{10^10,10^11}; the ...
lineage's user avatar
  • 1,124
1 vote
1 answer
110 views

Unnecessary error messages

...
Alx's user avatar
  • 3,632
0 votes
0 answers
64 views

Is it possible to turn off all messages for a specific mathematica file?

I have a general question. I have a big Mathematica file, which sometimes comes with some messages. Is it possible to turn off all messages forever in this notebook/file? BR Mads
MadsM's user avatar
  • 23
4 votes
1 answer
119 views

Restore output to notebook

While playing around in settings, I believe I did something to cause all output to be printed to a pop up window. How do I restore the output to the notebook where the evaluation occurs? In options ...
BOUNCE's user avatar
  • 559
1 vote
1 answer
259 views

Q: How to manage notebook crashes, "In a previous session", and memory consumption?

I worked in a notebook. Something went wrong. I do not know what or why. The notebook did not react anymore and closed. After it, I try to open the same notebook. Then the next text appears: "The ...
Michiel van Mens's user avatar
2 votes
0 answers
64 views

Find errors in collapsed notebook

I usually keep my notebooks collapsed to make understanding what's going on easier. The problem is that if there's an execution error, I have to expand everything in order to even know that there was ...
Mitchell Kaplan's user avatar
0 votes
0 answers
89 views

Quiet Messages with arguments

I have some global options that determine which messages are shown and which are not, e.g. $MessagesShown = {Power::infy}; $MessagesNotShown = All; Now the first ...
Jansen's user avatar
  • 1,223
0 votes
0 answers
73 views

customisable error checking, message handling code

I have an iterated computation running in a while loop, which is bound to fail at some point, at which point I want it to stop, e.g. ...
Jansen's user avatar
  • 1,223
3 votes
1 answer
173 views

Building a function that uses $Assumptions and works like Simplify, FunctionExpand, etc

I want to write a function MySimplify (like built-in Simplify) that takes a second argument to specify additional ...
QuantumDot's user avatar
  • 19.6k
2 votes
2 answers
531 views

How to produce an error message for function with a wrong parameter and default values for other parameter

Consider this function w[x_Integer: 2, y__List : {1, 2}, z_String: "X"] := {x y, z} w[4] {{4, 8}, "X"} Now I want to define an error message to be displayed ...
Sumit's user avatar
  • 15.9k
2 votes
1 answer
141 views

How to catch error messages from parallel kernels

Doing something that throws out an error (warning): ParallelTable[NIntegrate[1/Sin[10 t], {t, 0, W}], {W, 0, 10, 1}] In parallel somehow limits a possiblity to ...
Vsevolod A.'s user avatar
1 vote
1 answer
113 views

How do I implement this feature in Manipulate?

I am trying to create a dialog box that informs the user when the input is wrong (or even when any type of error occurs) in the manipulate function. I have the following code: ...
JonD123's user avatar
  • 83
6 votes
1 answer
373 views

Print messages of parallel kernels to console

This question shows how to print output to the console, but how about messages? For the main kernel, I know this way: ...
stone-zeng's user avatar
2 votes
2 answers
3k views

How to stop the suppression of the warnings output? [duplicate]

I have some table of numerical integrals, and during the evaluation there are outputs like NIntegrate::ncvb: NIntegrate failed to converge to prescribed accuracy after 9 recursive bisections in x ...
John Taylor's user avatar
  • 5,387
3 votes
2 answers
104 views

Correct 2D representation in a message string

Message knows how to convert an expression (taken as an argument) into a string before it is spliced into an actual message: If I run the following in my terminal ...
QuantumDot's user avatar
  • 19.6k
4 votes
0 answers
49 views

Strange behavior of symbol::messageName in debugger [duplicate]

According to the documentation, there are two ways to define a message, which I implement as: ...
FalafelPita's user avatar
4 votes
1 answer
402 views

Turn off a message forever?

I am using Mathematica on an offline PC. I constantly get the message PacletInstall::Offline at startup. Is there a way to turn off this message forever? I know ...
a06e's user avatar
  • 11.3k
9 votes
1 answer
128 views

Understanding EvaluationData in messages context

Can I Quiet my procedure and still get messages info from inner EvaluationData? This works fine: ...
Kuba's user avatar
  • 137k
7 votes
3 answers
572 views

Avoiding the suppression of messages by NIntegrate

Consider the following code: test[x_] := If[1 < x < 2, Message[Test::message]; x^2, x]; NIntegrate[test[x], {x, 0, 3}] 5.33333333333334 I.e. it gives me ...
Ruslan's user avatar
  • 7,142
4 votes
3 answers
258 views

Find prefix of list in Association

I am trying to write some kind of demonstration for coding algorithm (for prefix codes). I have an Association that contains lists of bits (0s and 1s): ...
kobibo's user avatar
  • 215
5 votes
1 answer
142 views

How to get all messages defined for a built-in symbol?

AFAICT, when given a built-in symbol as argument, Messages returns an empty list, at least initially. For example: ...
kjo's user avatar
  • 11.7k
5 votes
2 answers
101 views

Plot & StreamPlot eat my Messages

I have a complicated function for StreamPlot to call that includes some error checking and the use of Message. Somehow the ...
Chris K's user avatar
  • 20.1k
8 votes
1 answer
265 views

How to include a backquote in a message?

NB: I know one suboptimal solution to this problem, which I give at the end. I'm looking for a better one. Also, I was not able to solve this problem with the solutions give in Backquote in string ...
kjo's user avatar
  • 11.7k
3 votes
2 answers
317 views

How to get the error information after run a wrong expression

If we run this code: FindCycle[1, 2, 3, 4, 5] It will give a error information like: How to get the error info promption of ...
yode's user avatar
  • 26.5k
6 votes
2 answers
346 views

Write Unit Test with expected Message

Using Workbench, I would like to check if my function does emit a message under certain circumstances. How can I test this using an .mt file? I only know about the ...
Karsten W.'s user avatar
  • 1,383
3 votes
1 answer
150 views

Numerous Extraneous Error Messages from EvaluationData

In the course of solving question 134644, I encountered the message Reduce::ztest1: Unable to decide whether numeric quantity -Log[5381171456512]+Log[(-Sqrt[101] Log2-10 Sqrt[101] Log[5]+101 (...
bbgodfrey's user avatar
  • 61.3k
4 votes
1 answer
237 views

How to make NIntegrate automatically resort to arbitrary precision if machine precision fails?

Sometimes NIntegrate gives me messages like NIntegrate::slwcon or NIntegrate::ncvb when I ...
Ruslan's user avatar
  • 7,142
14 votes
1 answer
209 views

Is there any difference between Quiet and Internal`DeactivateMessages?

Both Quiet and Internal`DeactivateMessages seem to suppress error messages. Does anyone have any experience with them and found ...
QuantumDot's user avatar
  • 19.6k
2 votes
0 answers
221 views

Check, Quiet and VerificationTest with messages?

I have a VerificationTest that is expected to generate some messages. It runs inside of code that uses Check to ...
masterxilo's user avatar
  • 5,729
3 votes
1 answer
87 views

Improving `$AssertFunction` to always tell what the assertion test resulted in

I really like this form of assertion failure: On[Assert]; Assert[1 + 1 == True]; Assert::asrttf: Assertion test 1+1==True evaluated to 2==True that is neither ...
masterxilo's user avatar
  • 5,729
3 votes
1 answer
53 views

Disable "The option to save automatically after each result is enabled" warning

Does anybody know a way to disable the message The option to save automatically after each result is enabled (NotebookAutoSave->True), but the notebook where you are placing results has not been ...
masterxilo's user avatar
  • 5,729
10 votes
1 answer
105 views

How to reset the size of the Stack Trace Window?

Normally the size of the Stack Trace window can easily be changed using the ResizeArea element in the lower right corner. However, if one makes this window too ...
Karsten7's user avatar
  • 27.4k