FUNCTION::ASSERT(3stap)

πŸ’– FUNCTION::ASSERT πŸ’– (that's a 3stap page, bestie, section 3 of the SystemTap tapsets)

✨ NAME ✨

function::assert β€” evaluate assertion πŸŽ€


🌸 SYNOPSIS 🌸

1) assert(expression:long)

2) assert(expression:long,msg:string)

πŸ¦‹ ARGUMENTS πŸ¦‹

  • expression β€” the expression we're evaluating, like the vibe check itself πŸ’…
  • msg β€” the formatted message string, aka the little note it leaves you πŸ“

πŸ‘‘ DESCRIPTION πŸ‘‘

  1. This function checks the expression, and if that expression evaluates to zero it aborts the current running probe, no cap 😭. It uses error, and it can get caught by try{} catch{} β€” so your probe isn't necessarily doomed forever, it's giving catchable energy. A default message will be displayed. πŸ™ˆ
  2. Same situation, same energy: this function checks the expression and aborts the current running probe if the expression evaluates to zero. It uses error and may be caught by try{} catch{}. The difference? The specified message will be displayed instead of the default one. 🌈
Lowkey important: zero = abort, so if you're not about that probe-stopping life, wrap it up in try{} catch{}. ✨

🌟 SEE ALSO 🌟


That's the whole page, periodt. This was the SystemTap Tapset Reference, version September 2026 β€” thanks for reading, bestie, ily, go assert responsibly πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from