Github user Jens-G commented on a diff in the pull request: https://github.com/apache/thrift/pull/1013#discussion_r64133311 --- Diff: tutorial/haxe/src/Main.hx --- @@ -51,14 +51,44 @@ class Main { private static var targetPort : Int = 9090; static function main() { - #if ! (flash || js) + + #if ! (flash || js || phpwebserver) try { ParseArgs(); } catch (e : String) { trace(e); trace(GetHelp()); return; } + + #elseif phpwebserver --- End diff -- I would like to have all those "//remap trace to error log" sections reafctored into a dedicated method. As it is now, it bloats the main() method with stuff that definitely belongs onto a different level of abstraction. The main method serves two purposes: parsing args (or similar) to set up the system, then start the right program mode. Aside from some added root level error handling, that's it and that should be it. Anything else belongs into either the first part, or the second. Considereing the fact that we seem to need the same code over and over again for PHP (see your own README changes), why don't we put the stuff it into a library utility function, preventing the need for further copy+paste programming?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---