0

i am searching for that output error recently, but every answer here only explaining why that output happened on a specific case and solved a chunk of code.

like here and here

i hope there's anyone who can give a well elaborated answer, generally explaining what this output is actually mean and how to (elegantly) avoid this error.

note : im working on a project using .NET framework on windows store apps

Community
  • 1
  • 1
RJJatson
  • 99
  • 9

2 Answers2

3

An ArgumentExeption means that there was an error with an argument that was passed to a function. Normally the exception should contain the name of the offending parameter.

A more specialised exception is the ArgumentNullException which means that an Argument was null where it must not be null. Or the ArgumentOutOfRangeException which means that an argument requires a specific range (e.g. 1-100) and an invalid value was passed (e.g. 101).

See MSDN for more Information: https://msdn.microsoft.com/de-de/library/system.argumentexception(v=vs.110).aspx?f=255&MSPPError=-2147217396

wertzui
  • 5,148
  • 3
  • 31
  • 51
2

"A first chance exception" means you've set up your debugger to let you know whenever exceptions get thrown, regardless of whether there's code to handle those exceptions properly. They can even appear inside .NET Framework source code, if you've also set up your debugger to debug all IL code rather than just that of your project.

Unless there's an actual problem, don't worry about first-chance exceptions, just turn off the notifications: in the Exception Settings window, uncheck the "Break When Thrown" checkbox. You'll still be alerted whenever an exception isn't handled.