
from rapydo.do.app import Application
import better_exceptions as be


def main():
    be  # activate better exceptions
    Application()


if __name__ == '__main__':
    main()


import better_exceptions as be
from rapydo.do.app import Application
from rapydo.utils.logs import get_logger

log = get_logger(__name__)


def main():
    be  # activate better exceptions
    try:
        Application()
    except KeyboardInterrupt:
        log.critical("Interrupted by the user")
    else:
        log.verbose("Application completed")


if __name__ == '__main__':
    main()

Handle nicely keyboard interruption (ctrl+c)
Handle nicely keyboard interruption (ctrl+c)

  
+ import better_exceptions as be
  from rapydo.do.app import Application
- import better_exceptions as be
+ from rapydo.utils.logs import get_logger
+ 
+ log = get_logger(__name__)
  
  
  def main():
      be  # activate better exceptions
+     try:
-     Application()
+         Application()
+     except KeyboardInterrupt:
+         log.critical("Interrupted by the user")
+     else:
+         log.verbose("Application completed")
  
  
  if __name__ == '__main__':
      main()
  
Handle nicely keyboard interruption (ctrl+c)
## Code Before:

from rapydo.do.app import Application
import better_exceptions as be


def main():
    be  # activate better exceptions
    Application()


if __name__ == '__main__':
    main()

## Instruction:
Handle nicely keyboard interruption (ctrl+c)
## Code After:

import better_exceptions as be
from rapydo.do.app import Application
from rapydo.utils.logs import get_logger

log = get_logger(__name__)


def main():
    be  # activate better exceptions
    try:
        Application()
    except KeyboardInterrupt:
        log.critical("Interrupted by the user")
    else:
        log.verbose("Application completed")


if __name__ == '__main__':
    main()
