# How to throw invalid arguments

**URL:** <https://forum.codewithmosh.com/t/how-to-throw-invalid-arguments/21086>\
**Category:** Uncategorized\
**Created:** [June 26, 2023, 2:30pm UTC](https://forum.codewithmosh.com/t/how-to-throw-invalid-arguments/21086 "2023-06-26T14:30:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moba](https://avatars.discourse-cdn.com/v4/letter/m/cab0a1/32.png) [@Moba](https://forum.codewithmosh.com/u/Moba)\
**Post date:** [June 26, 2023, 2:30pm UTC](https://forum.codewithmosh.com/t/how-to-throw-invalid-arguments/21086/1 "2023-06-26T14:30:47Z")

</div>

Any time I throw invalid arguments my codes does not behave the way I want it it returns something like  
“What. () width  
What is wrong with my code

---

<div class="post-metadata">

**Author:** ![UniqueNospaceShort](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/uniquenospaceshort/32/1814_2.png) [@UniqueNospaceShort](https://forum.codewithmosh.com/u/UniqueNospaceShort)\
**Post date:** [June 27, 2023, 9:02pm UTC](https://forum.codewithmosh.com/t/how-to-throw-invalid-arguments/21086/2 "2023-06-27T21:02:15Z")

</div>

Hi,  
1st welcome in here.  
Before anyone would answer what would be wrong with your code,  
can you tell what is wrong with your question?

This is what I see

 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/3/3e1507e2a5b4c56db2e9464cd7848b48e3c66b59.png)

Best Regards.

**EDIT** :  
Here are a few hints from other new questions

![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/e/e9dd73b7cd4a04f807fb41453661690f763d1c6e.png)  
 ![image](https://us1.discourse-cdn.com/flex020/uploads/codewithmosh/original/2X/f/fae48083101c2a9a474bbf3585da2aa2a7e661e3.png)
