• 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

  • Replies 3
  • Subscribers 146
  • Views 48
  • Members are here 0

Capture errset stdout into a variable

TF202506034656
TF202506034656 3 hours 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
  • Sign in to reply
Parents
  • TF202506034656
    TF202506034656 2 hours ago

    ipcProcess is another prospect I suppose?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mbracht
    mbracht 1 hour ago in reply to TF202506034656

    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 +1 Vote Down
    • Sign in to reply
    • Cancel
  • TF202506034656
    TF202506034656 1 hour ago in reply to mbracht

    That is perfect thank you! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • TF202506034656
    TF202506034656 1 hour ago in reply to mbracht

    That is perfect thank you! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • 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.

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

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