You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

82 lines
2.5 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: test/scratch/test.scratch.fe.simple.WithCallback/test.scratch.fe.simple.WithCallback.cpp
  3. *
  4. * Purpose: Implementation file for the test.scratch.fe.simple.WithCallback project.
  5. *
  6. * Created: 15th November 2010
  7. * Updated: 29th November 2010
  8. *
  9. * Status: Wizard-generated
  10. *
  11. * License: (Licensed under the Synesis Software Open License)
  12. *
  13. * Copyright (c) 2010, Synesis Software Pty Ltd.
  14. * All rights reserved.
  15. *
  16. * www: http://www.synesis.com.au/software
  17. *
  18. * ////////////////////////////////////////////////////////////////////// */
  19. #define PANTHEIOS_NO_INCLUDE_OS_AND_3PTYLIB_STRING_ACCESS
  20. #include <pantheios/util/test/compiler_warnings_suppression.first_include.h>
  21. /* Pantheios Header Files */
  22. #include <pantheios/pan.hpp>
  23. #include <pantheios/frontends/stock.h>
  24. /* Standard C++ Header Files */
  25. #include <exception>
  26. #include <iostream>
  27. /* Standard C Header Files */
  28. #include <stdlib.h>
  29. #include <pantheios/util/test/compiler_warnings_suppression.last_include.h>
  30. /* /////////////////////////////////////////////////////////////////////////
  31. * Application-defined functions
  32. */
  33. PANTHEIOS_CALL(PAN_CHAR_T const*) pantheios_fe_getAppProcessIdentity(void) /* throw() */
  34. {
  35. return PANTHEIOS_LITERAL_STRING("test.scratch.fe.simple.WithCallback");
  36. }
  37. /* ////////////////////////////////////////////////////////////////////// */
  38. static int main_(int /* argc */, char** /*argv*/)
  39. {
  40. pan::log_DEBUG(PANTHEIOS_LITERAL_STRING("debug"));
  41. pan::log_INFORMATIONAL(PANTHEIOS_LITERAL_STRING("informational"));
  42. pan::log_NOTICE(PANTHEIOS_LITERAL_STRING("notice"));
  43. pan::log_WARNING(PANTHEIOS_LITERAL_STRING("warning"));
  44. pan::log_ERROR(PANTHEIOS_LITERAL_STRING("error"));
  45. pan::log_CRITICAL(PANTHEIOS_LITERAL_STRING("critical"));
  46. pan::log_ALERT(PANTHEIOS_LITERAL_STRING("alert"));
  47. pan::log_EMERGENCY(PANTHEIOS_LITERAL_STRING("emergency"));
  48. return EXIT_SUCCESS;
  49. }
  50. int main(int argc, char** argv)
  51. {
  52. try
  53. {
  54. return main_(argc, argv);
  55. }
  56. catch(std::exception &x)
  57. {
  58. pan::log_ALERT(PANTHEIOS_LITERAL_STRING("Unexpected general error: "), x, PANTHEIOS_LITERAL_STRING(". Application terminating"));
  59. }
  60. catch(...)
  61. {
  62. pan::logputs(pan::emergency, PANTHEIOS_LITERAL_STRING("Unhandled unknown error"));
  63. }
  64. return EXIT_FAILURE;
  65. }
  66. /* ///////////////////////////// end of file //////////////////////////// */