Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

System.Overflow Exception - int32 is too large or small

Tags:

c#

overflow

I need a little advice.

I've got windows service that runs at night. In my development environment, it runs without exception, but when I running it "installed on other machines", when I come in the morning, I'm welcomed with a System.Overflow exception that says that I've set an int32 to a value that is too large or small.

I've carefully combed the service's c# code, and I have try/catch statements around everything, that should catch any error and write it to a log without completely stopping my service with this overflow exception. But still, it occurs and stops the service.

I'd appreciate any conceptual advice on how to pin point what's causing an error such as this.

like image 979
Lonnie Best Avatar asked Nov 23 '25 12:11

Lonnie Best


1 Answers

  • You must have missed an instance of try/catch or you have an error in your error handler or it would be handled.
  • In windows you can setup your service to restart if it ends unexpected manner.
like image 86
rerun Avatar answered Nov 26 '25 00:11

rerun



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!