Page 2 of 2 FirstFirst 12
Results 21 to 22 of 22
  1. #21
    tharpa is offline Member
    Join Date
    Nov 2013
    Rep Power

    Default Re: Not having calling method fail if called method silently fails

    Quote Originally Posted by Norm View Post
    Using a SecurityManager to trap calls to System.exit() would allow the program to know there won't be a return to the main() method.

    Why didn't you see what was printed by line 21?
    I will check into the SecurityManager, thanks. Line 21 is not appearing in the console output. Probably because there's so much output there that it's exceeding the size of the console.

    Edit: SecurityManager seems to have been what I was looking for. Using that, although I had to modify (make a copy of) the called main method, I can now put a breakpoint in the catch of the calling Main method and hit it when it fails. Thanks to Norm.
    Last edited by tharpa; 02-06-2018 at 04:30 PM. Reason: Problem solved.

  2. #22
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Not having calling method fail if called method silently fails

    exceeding the size of the console.
    Pass/pipe the console output to a text file. On windows:
    "C:\Program Files\Genymobile\Genymotion\tools\adb.exe" logcat >> GM_LogcatFIle.txt
    This commandline writes the output from the adb.exe program to the GM_LogcatFile.txt file
    If you don't understand my response, don't ignore it, ask a question.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 17
    Last Post: 10-23-2014, 08:17 PM
  2. Replies: 2
    Last Post: 07-11-2013, 04:09 AM
  3. Thread problem, calling method in run method
    By majk in forum Threads and Synchronization
    Replies: 4
    Last Post: 09-27-2010, 11:40 AM
  4. Calling The main method from another method
    By SwissR in forum New To Java
    Replies: 3
    Last Post: 07-27-2010, 11:03 AM
  5. Replies: 29
    Last Post: 09-25-2008, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts