• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. Capture errset stdout into a variable

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 149
  • Views 1943
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Capture errset stdout into a variable

Trevor F
Trevor F 6 months ago

Good evening, I'm attempting to make a "function linter" to run a couple generic test cases through a function to ensure it succeeds a baseline.

My current workflow is running them through an errset. I see that errset has a t/nil property for printing the error, but I need access to the actual error string. Is there a solid way to redirect the stdout into a variable? I can see redirecting it into a file and reading it into a variable but that route seems erroneous. 

Example:
procedure(test(x) unless(x == 1 error("generic error"))
res = errset(apply('test list(2)) t)
prints: *Error* generic error


Thanks, Trevor

  • Cancel
Parents
  • Trevor F
    Trevor F 6 months ago

    ipcProcess is another prospect I suppose?

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mbracht
    mbracht 6 months ago in reply to Trevor F

    Hi,

    The actual error message is available in the symbol property errset.errset. Technically it is a list with the 5th element being a sublist with it's first element being the actual error as a string...try this:


    (unless (errset 1/0) (println (car (nth 4 errset.errset))))

    regards
    Max

    • Cancel
    • Vote Up +2 Vote Down
    • Cancel
  • Trevor F
    Trevor F 6 months ago in reply to mbracht

    That is perfect thank you! 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Trevor F
    Trevor F 6 months ago in reply to mbracht

    That is perfect thank you! 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information