Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3361354
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T03:08:33+00:00 2026-05-18T03:08:33+00:00

Whenever I create a large Mathematica project I run into this problem: Preventing avalanche

  • 0

Whenever I create a large Mathematica project I run into this problem: Preventing avalanche of runtime errors in Mathematica, i.e., Mathematica’s error message are opaque, archaic, and legion.

The idea then is to disable all of Mathematica’s own error messages and implement type checking and error messages of your own in every Function and Module. However I have not found a simple and efficient way of doing this and end up with, e.g., some function generating an error 20 function calls deep and then get a whole cascade of error messages all the way back up to the main routine.

How would you set up a simple mechanism for this that only generates one error message at the function that experiences the error and a simple list of the chain of function calls?

EDIT: Since it has come up in a couple of answers; I am specifically looking for something lightweight regarding the output it produces (otherwise I could just stick with Mathematica’s error messages) and obviously also lightweight in computational overhead. So while Stack and Trace are definitely light on the overhead, their output in complex projects is not quick to parse and some work needs to be done simplifying it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T03:08:33+00:00Added an answer on May 18, 2026 at 3:08 am

    YAsI – Yet Another (silly?) Idea …

    Re-reading your question …


    The idea then is to disable all of Mathematica’s own error messages and implement type checking and error messages of your own in every Function and Module.

    Found this:

    $MessagePrePrint = ( #; Print[Stack[_][[;; -5]]]; Abort[]) &  
    
    v[x_, y_] := w[x, y];
    w[x_, y_] := x/y;
    
    StackComplete@v[1, 0];
    
    During evaluation of In[267]:= {StackComplete[v[1,0]];,
              StackComplete[v[1,0]], v[1,0], w[1,0], 1/0, 1/0, Message[Power::infy,1/0]}
    
    Out[267]= $Aborted
    

    conclusion … Aborts at first message and leaves a “reasonable” stack trace. “Reasonable” means “Should be improved”.

    But it is completely non-intrusive!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a project in Java requiring to load large files (corpus for NLP)
I have a large number of objects which are identified by names (strings). So,
Whenever I use 'ab' to benchmark a web server, it will freeze for a
I have a large table (several million rows) in a MySQL (version 5.0) database
I am currently in process of making our application Large Address Aware. As experience
I'm looking for the most basic solution to create multiple indexes on a Java
I'm trying to create an effect where if the user hovers the mouse over
If you're in a team and a programmer gives you an interface with create,
I am developing (using Silvelight 3) an aplication that creates some kind of timeline
I have recently started using CAML.NET IntelliSense for SharePoint with Visual Studio 2008; which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.