Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. exit( ); Error descriptions in VC++ 7!

exit( ); Error descriptions in VC++ 7!

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++helptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CreepingFeature
    wrote on last edited by
    #1

    Hi! Don't even know how to put this! So just try to guess what I mean! :laugh: In VC++ you can include this line exit(100); etc. And force the program to exit to OS with VC++ reporting, in the EXIT window: programm....exited with code (100) or something like that. My question is this: Is there a way to tell VC++ to report 100 as say wrong argument for myFuntion(int); instead of just reporting error number? I only want to know how to make VC report the error with description not the program itself (ie. via a dialog window). -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: --------------------------------------------------------

    J 1 Reply Last reply
    0
    • C CreepingFeature

      Hi! Don't even know how to put this! So just try to guess what I mean! :laugh: In VC++ you can include this line exit(100); etc. And force the program to exit to OS with VC++ reporting, in the EXIT window: programm....exited with code (100) or something like that. My question is this: Is there a way to tell VC++ to report 100 as say wrong argument for myFuntion(int); instead of just reporting error number? I only want to know how to make VC report the error with description not the program itself (ie. via a dialog window). -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: --------------------------------------------------------

      J Offline
      J Offline
      jhwurmbach
      wrote on last edited by
      #2

      CreepingFeature wrote: Is there a way to tell VC++ to report 100 as say wrong argument for myFuntion(int); instead of just reporting error number No, not a far as I know of. These so called return code is some sort of the lowest common demnominator of error reporting. They are designed to work on every OS. All you know is that '0' means 'No Error'. Other codes have to be documented (on Unix, man pages do this, but windows is deficient in this way, too) to be used in eg. batch scripts.


      "We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups