Test::...:Errors(3pm)

πŸ“¦
version 0.87 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Test::...:Errors β€” the manual page, bestie edition πŸ’–

So this is the page for Test::...:Errors, hanging out in the User Contributed Perl Documentation section. It's cute, it's short, and it does exactly one thing: it makes your errors look consistent. Periodt.


✨ NAME ✨

Test::BDD::Cucumber::Errors β€” Consistently formatted errors πŸ’…

🌸 VERSION 🌸

version 0.87 β€” yeah bestie, we're on the 0.87 timeline πŸ¦‹

πŸŽ€ DESCRIPTION πŸŽ€

Consistently formatted errors.

That's it. That's the whole vibe. Consistent. Errors. Iconic. ✨

πŸ’œ NOTE πŸ’œ

Okay so important, listen up:

This module is not here to help you throw error classes, bestie. Nope. It's just here to give you helpers so certain errors get formatted the same way every single time. That's the whole job. 🫢

So like, most of the errors you'll actually throw in practice? They're errors about the input test scenarios. And when you're debugging those, it's so helpful to have the location of the error and the context around it. Chef's kiss. 😌

Maybe in the future these can return error objects. Maybe. Not today. (The author said "perhaps", so we're holding space for that.)

And here's the tea on encoding: all the current uses β€” as of 2016-02-09 β€” just pass the results straight to die. So the author decided to UTF8 encode the error message, on the basis that this probably constitutes an application boundary. Which is honestly valid. πŸ’€

🌈 SYNOPSIS 🌈

Look at her go:

use Test::BDD::Cucumber::Errors qw/parse_error_from_line/;

parse_error_from_line(
  "Your input was bad",
  $line
);

Import the one thing, hand it a reason and a line, done. Slay.

πŸ”₯ PARSER ERRORS πŸ”₯

πŸ¦‹ parse_error_from_line πŸ¦‹

This one generates a parser error from a Test::BDD::Cucumber::Model::Line object, plus an error reason. Two ingredients, one error. ✨

parse_error_from_line(
  "Your input was bad",
  $line
);

Like, that's literally it. You give it your reason, you give it your Line, it gives you a formatted parser error. No cap. πŸ’–

πŸ‘‘ AUTHOR πŸ‘‘

Peter Sergeant "pete@clueball.com" β€” the icon who wrote this πŸ’…

⭐ LICENSE ⭐

Copyright 2019-2023, Erik Huelsmann
Copyright 2014-2019, Peter Sergeant; Licensed under the same terms as Perl

Same terms as Perl, bestie. We love a permissive queen. πŸŽ€


And that's the page!! This one came to you from perl v5.40.1, dated 2025-05-29, and it lives at Test::...:Errors(3pm). Go format some errors consistently, you gorgeous genius. Byeeee πŸ«Άβœ¨πŸ’œ

πŸ“¦ where this page comes from