Examples of PerforceException


Examples of com.tek42.perforce.PerforceException

            logPrinter.start();
            filePath.act(remoteCall);
            logPrinter.join();

        } catch (Exception e) {
            throw new PerforceException("Could not run quick clean.", e);
        }
    }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

            if (depot != null) {
                try {
                    int number = Integer.parseInt(change);
                    Changelist changelist = depot.getChanges().getChangelist(number, -1);
                    if (changelist.getChangeNumber() != number)
                        throw new PerforceException("broken");
                } catch (Exception e) {
                    return FormValidation.error("Changelist: " + change + " does not exist.");
                }
            }
            return FormValidation.ok();
View Full Code Here

Examples of com.tek42.perforce.PerforceException

                    LOGGER.log(Level.FINE, "P4 Where Parsing Error: "+map.get("data"));
                    if(map.get("data")!=null){
                        if(map.get("data").contains("not in client view")){
                            //this is non-fatal, but not sure what to do with it
                        } else {
                            throw new PerforceException("P4 Where Parsing Error: "+map.get("data"));
                        }
                    }
                }
                if(map.get("depotFile") == null || map.get("clientFile") == null || map.get("path") == null){
                    //not a valid mapping for some reason...
                    //possibly because some versions of perforce return the wrong values
                    LOGGER.log(Level.WARNING, "P4 Where returned unexpected output! Check to make sure your perforce client and server versions are up to date!");
                    continue;
                }
                depot = map.get("depotFile");
                workspace = map.get("clientFile");
                filesystem = map.get("path");

                maps.add(new WhereMapping(depot,workspace,filesystem));
            }
        } catch (IOException e) {
            throw new PerforceException("Could not parse Where map.", e);
        }
        return maps;
    }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

        } catch(IOException e) {
            //try to close all the pipes before throwing an exception
            closeBuffers();
           
            throw new PerforceException("Could not run perforce command.", e);
        }
    }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

    final Counter counter = new Counter();
    counter.setName("");
    if(m.find()) {
                    counter.setValue(Integer.parseInt(m.group(0).trim()));
    } else {
                    throw new PerforceException("Could not get value of counter.\nResponse from perforce was:\n" + sb);
                }
    return counter;
  }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

      for(String view : label.getViews()) {
        writer.write("\t" + view + "\n");
      }
      writer.write("\n");
    } catch(IOException e) {
      throw new PerforceException("Failed to save label", e);
    }
  }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

        }
      }
    } catch(Exception e) {
      logger.error("Exception: " + e.getMessage());
      throw new PerforceException("Failed to retrieve changelist.\nResponse from perforce was:\n" + sb, e);
    }
    return change;
  }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

          out.write("View:\n");
          out.write(" " + workspace.getViewsAsString() + "\n");
      }

    } catch(IOException e) {
      throw new PerforceException("Failed to save workspace", e);
    }
  }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

                        output = currentProcess.getOutputStream();
      reader = new BufferedReader(new InputStreamReader(currentProcess.getInputStream()));
      writer = new BufferedWriter(new OutputStreamWriter(currentProcess.getOutputStream()));

    } catch(IOException e) {
      throw new PerforceException("Failed to open connection to: " + args[0], e);
    }
  }
View Full Code Here

Examples of com.tek42.perforce.PerforceException

              if (log.length() > 0) {
                  error.append("\nWith Data:\n===================\n");
                  error.append(log);
                            error.append("\n===================\n");
              }
                        throw new PerforceException(error.toString());
          }
          throw new PerforceException(info.toString());
        }

      } catch(IOException e) {
        throw new PerforceException("Failed to open connection to perforce", e);
      } finally {
                                try{
                                    p4.getWriter().close();
                                } catch (IOException e) {
                                    //failed to close pipe, but we can't do much about that
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.