Changeset 417


Ignore:
Timestamp:
03/19/12 13:04:11 (12 years ago)
Author:
vmipsl
Message:

script shell

Location:
tapas/common
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tapas/common/implementation/com/ether/EtherHelper.java

    r409 r417  
    196196    } 
    197197 
     198 
     199    /** 
     200     * This method executes the script/command given in parameter 
     201     * Example of use : execProcess( "/home_local/pif.sh pof" ); 
     202     * 
     203     * @param command 
     204     */ 
     205    public static void execProcess( @NotNull final String command ) 
     206            throws FormattedException 
     207    { 
     208        try 
     209        { 
     210            final Runtime runtime = Runtime.getRuntime(); 
     211            runtime.exec( command ); 
     212        } 
     213        catch( IOException e ) 
     214        { 
     215            throw new FormattedException( FormattedException.FormattedCode.ERROR_IO_TO_EXECUTE_PROCESS, e ); 
     216        } 
     217    } 
    198218} 
  • tapas/common/interface/com/ether/FormattedException.java

    r402 r417  
    8686    } 
    8787 
     88    public static enum FormattedCode 
     89            implements Code 
     90    { 
     91        ERROR_IO_TO_EXECUTE_PROCESS, 
     92    } 
     93 
    8894    public static String DEFAULT_MESSAGE = "no message"; 
    8995    public static String DEFAULT_THROWABLE = null; 
Note: See TracChangeset for help on using the changeset viewer.