ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peterrei...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant TaskAdapter.java Project.java
Date Thu, 22 Jan 2004 18:59:47 GMT
peterreilly    2004/01/22 10:59:47

  Modified:    src/main/org/apache/tools/ant TaskAdapter.java Project.java
  Log:
  better reporting of linkage error in checkTaskClass
  PR: 26332
  Obtained from: Jesse Glick
  
  Revision  Changes    Path
  1.24      +5 -1      ant/src/main/org/apache/tools/ant/TaskAdapter.java
  
  Index: TaskAdapter.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/TaskAdapter.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- TaskAdapter.java	17 Jul 2003 11:04:16 -0000	1.23
  +++ TaskAdapter.java	22 Jan 2004 18:59:47 -0000	1.24
  @@ -1,7 +1,7 @@
   /*
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 2000-2003 The Apache Software Foundation.  All rights
  + * Copyright (c) 2000-2004 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -106,6 +106,10 @@
               final String message = "No public execute() in " + taskClass;
               project.log(message, Project.MSG_ERR);
               throw new BuildException(message);
  +        } catch (LinkageError e) {
  +            String message = "Could not load " + taskClass + ": " + e;
  +            project.log(message, Project.MSG_ERR);
  +            throw new BuildException(message, e);
           }
       }
   
  
  
  
  1.159     +5 -1      ant/src/main/org/apache/tools/ant/Project.java
  
  Index: Project.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/Project.java,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -r1.158 -r1.159
  --- Project.java	13 Jan 2004 12:42:38 -0000	1.158
  +++ Project.java	22 Jan 2004 18:59:47 -0000	1.159
  @@ -926,6 +926,10 @@
                   + taskClass;
               log(message, Project.MSG_ERR);
               throw new BuildException(message);
  +        } catch (LinkageError e) {
  +            String message = "Could not load " + taskClass + ": " + e;
  +            log(message, Project.MSG_ERR);
  +            throw new BuildException(message, e);
           }
           if (!Task.class.isAssignableFrom(taskClass)) {
               TaskAdapter.checkTaskClass(taskClass, this);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message