---
title: "Discussion on \"Code Smell 184 - Exception Arrow Code\" | Hashnode"
description: "Discussion on \"Code Smell 184 - Exception Arrow Code\". Arrow code is a code smell. Exception polluting is another. This is a mortal combination."
url: "https://hashnode.com/posts/code-smell-184-exception-arrow-code/638d1c92c30dc85277832e49"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Code Smell 184 - Exception Arrow Code](https://maximilianocontieri.com/code-smell-184-exception-arrow-code?utm_source=hashnode&utm_medium=feed)

Arrow code is a code smell. Exception polluting is another. This is a mortal combination.

Dec 4, 2022 · 2 min read · maximilianocontieri.com  
Updated Dec 6, 2022  
Read the article

-   [#programming](https://hashnode.com/tag/programming)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#code-smell-1](https://hashnode.com/tag/code-smell-1)
-   [#refactoring](https://hashnode.com/tag/refactoring)
-   [#general-advice](https://hashnode.com/tag/general-advice)

## Written by

[Maxi Contieri](https://hashnode.com/@mcsee)

@mcsee · Buenos Aires

  
[View profile](https://hashnode.com/@mcsee)

Software Engineer

I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.

## Responses 1

Markdown supported · ⌘↵ to post

[Gary McMeekin](https://hashnode.com/@garymcm)

[Dec 5, 2022](https://hashnode.com/posts/code-smell-184-exception-arrow-code/638d1c92c30dc85277832e49/comment/638e0690895a9daa034fc057)

I really enjoy these posts. Thank you for taking the time to do this work.

An understandable refactoring error, but in the problem code you only save if the file doesn't exist, but in the refactored code you left in the negation, meaning if the file doesn't exist you raise a File Exists exception.

I'll delete myself if I've read that wrong :).

[Maxi Contieri](https://hashnode.com/@mcsee)

[Dec 6, 2022](https://hashnode.com/posts/code-smell-184-exception-arrow-code/638d1c92c30dc85277832e49/comment/638e0690895a9daa034fc057#reply-638f5114d8d8c9aa28bd131c)

Amazing!

Love this kind of comments. It was a refactoring mistake due to the lack of tests. And nobody noticed it before.

Fixed. Thank you so much!
