Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • This approach would be closer to the option of passing the caller, but instead of using it in an if-statement calling appropriate function on it, which will let that concern be dealt with by the frontend instead, which makes more sense than religiously using exceptions. But not splitting up functions into smaller parts was also an issue for me, I have realized. In this specific example I ended up splitting the function into a title_to_id() for getting the id and handling the frontend specific logic in the frontend module, then calling remove_by_id(). This separates the logic more. Commented Apr 6 at 20:21