Results 1 to 3 of 3

Thread: idea of remove all try catch(){...} block

  1. #1
    Join Date
    Jun 2005
    Location
    Mississauga, ON
    Posts
    6

    Default idea of remove all try catch(){...} block

    After using the ThrowsAdvice, all the "try" and "catch () {....}" in the other classes need to be removed. There are hundreds of “try …catch …” blocks

    Have any fast way or tools let the job done?
    :idea:

  2. #2
    Join Date
    Aug 2004
    Location
    San Mateo, CA
    Posts
    1,265

    Default

    You could use AspectJ. You can write an aspect that will produce a compile-time error or warning on a given usage. You could then compile your code with AJC until you remove all the code you don't want.
    Rod Johnson - GM, SpringSource Division, VMware
    http://www.springsource.com
    Spring From the Source

  3. #3
    Join Date
    Jun 2005
    Location
    Mississauga, ON
    Posts
    6

    Default

    Quote Originally Posted by Rod Johnson
    You could use AspectJ. You can write an aspect that will produce a compile-time error or warning on a given usage. You could then compile your code with AJC until you remove all the code you don't want.
    Great idea. Thanks Rod. I will try it.

Similar Threads

  1. Replies: 7
    Last Post: May 18th, 2005, 04:38 PM
  2. Replies: 3
    Last Post: May 18th, 2005, 10:07 AM
  3. Replies: 6
    Last Post: Apr 6th, 2005, 08:14 AM
  4. Replies: 7
    Last Post: Jan 19th, 2005, 10:54 AM
  5. About release connection in finally block
    By Savagearts in forum Data
    Replies: 3
    Last Post: Nov 5th, 2004, 08:10 AM

Posting Permissions

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