Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/firefly/java/edu/caltech/ipac/astro/CoordUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class CoordUtil
private static final String LON_TOO_BIG =
"Longitude is too big (>=360.0)";
private static final String LON_NEGATIVE =
"Longitude can not be negative";
"Longitude cannot be negative";
private static final String RA_TOO_BIG =
"RA is too big (>=24 hours)";
private static final String INVALID_STRING = "Invalid Input";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ public static String resolveUrl(String url) {
return ServerContext.getRequestOwner().getBaseUrl() + url;
}
} catch (Exception e) {
throw new IllegalStateException("host url can not be derived");
throw new IllegalStateException("host url cannot be derived");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ protected String getParams(CatalogRequest req) throws EndUserException, IOExcept
sb.append(param(CatalogRequest.POLYGON, urlEncode(req.getPolygon())));
break;
case TABLE:
throw new EndUserException("Could not do Multi Object search, internal configuration wrong.",
throw new EndUserException("Could not do Multi Object search, the internal configuration is wrong.",
"table should be a post search not a get");
default:
assert false; // should only happend if a new method was added and not added here
Expand Down Expand Up @@ -240,7 +240,7 @@ protected void insertPostParams(CatalogRequest req) throws EndUserException, IOE
requiredPostFileCacheParam(CatalogRequest.FILE_NAME, req.getFileName());

} else {
throw new EndUserException("Could not do search, internal configuration wrong.",
throw new EndUserException("Could not do search, the internal configuration is wrong.",
"search should be a get search not a post");
}
switch (req.getMethod()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ protected File loadDataFile(TableServerRequest request) throws IOException, Data
sdssUFile = getSDSSUploadFile(uploadFile);
} else {
throw new EndUserException("SDSS catalog search failed",
"Can not read uploaded file: "+ uploadFname);
"Cannot read uploaded file: "+ uploadFname);
}

URL url = new URL(SERVICE_URL_UPLOAD);
Expand Down Expand Up @@ -241,7 +241,7 @@ private void insertPostParams(TableServerRequest request, File sdssUFile) throw
_postBuilder.addFile("targets",sdssUFile);
} else {
throw new EndUserException("SDSS catalog search failed",
"Can not read uploaded file in SDSS format: "+ sdssUFile);
"Cannot read uploaded file in SDSS format: "+ sdssUFile);
}

String radiusArcMin = request.getParam(SDSSRequest.RADIUS_ARCMIN);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected String getQueryString(TableServerRequest req) throws DataAccessExcepti

WorldPt wpt = req.getWorldPtParam(ServerParams.USER_TARGET_WORLD_PT);
if (wpt == null) {
throw new DataAccessException("could not find the paramater: " + ServerParams.USER_TARGET_WORLD_PT);
throw new DataAccessException("could not find the parameter: " + ServerParams.USER_TARGET_WORLD_PT);
}
wpt = VisUtil.convert(wpt, CoordinateSys.EQ_J2000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public FileInfo getData(ServerRequest request) throws DataAccessException {
} catch (DataAccessException e) {
throw e;
} catch (Exception e) {
throw new DataAccessException("Request failed due to unexpected exception: ", e);
throw new DataAccessException("Request failed due to an unexpected exception", e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public DataGroup fetchDataGroup(TableServerRequest req) throws DataAccessExcepti
File outFile = createTempFile(req, ".vot");
HttpServices.Status status = HttpServices.getData(inputs, outFile);
if (status.isError()) {
throw DaliUtil.createDax("Failed to retrieve the result from", inputs.getRequestUrl(), status.getException());
throw DaliUtil.createDax("Failed to retrieve the result", inputs.getRequestUrl(), status.getException());
}
DataGroup[] results = VoTableReader.voToDataGroups(outFile.getAbsolutePath());

Expand All @@ -45,7 +45,7 @@ public DataGroup fetchDataGroup(TableServerRequest req) throws DataAccessExcepti
return results.length > 0 ? results[0] : null;

} catch (Exception e) {
throw DaliUtil.createDax("Failed to retrieve the result from", inputs.getRequestUrl(), e);
throw DaliUtil.createDax("Failed to retrieve the result", inputs.getRequestUrl(), e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public List<FileGroup> getData(ServerRequest sr) throws DataAccessException {
return fileGroups;
} catch (Exception e) {
LOGGER.error(e, "Error while processing request:" + StringUtils.truncate(sr, 512));
throw new DataAccessException("Request failed due to unexpected exception: ", e);
throw new DataAccessException("Request failed due to an unexpected exception", e);
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ private double[] concatenate(double[] a, double[] b) throws DataAccessException
if (a == null && b != null) return b;
if (b == null && a != null) return a;
if (a == null && b == null) {
throw new DataAccessException("can not concatenate two null data arrays ");
throw new DataAccessException("cannot concatenate two null data arrays");
}
double[] r = new double[a.length + b.length];
System.arraycopy(a, 0, r, 0, a.length);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public String getUniqueID(ServerRequest request) {
public String fetchData(ServerRequest request) throws DataAccessException {
String launcher = request.getParam(ExternalTaskHandler.LAUNCHER);
if (launcher == null) {
throw new DataAccessException(ExternalTaskHandler.LAUNCHER+" parameter is not found in request.");
throw new DataAccessException(ExternalTaskHandler.LAUNCHER+" parameter was not found in the request.");
}
ExternalTaskLauncher taskLauncher = new ExternalTaskLauncher(launcher);

Expand Down Expand Up @@ -75,7 +75,7 @@ public String fetchData(ServerRequest request) throws DataAccessException {
return jsonText;
} catch(ParseException pe){
LOGGER.error(getUniqueID(request) + " Can not parse returned JSON: " + pe.toString() + "\n" + jsonText);
throw new DataAccessException(request.getRequestId()+" Can not parse returned JSON: " + pe.toString());
throw new DataAccessException(request.getRequestId()+" Cannot parse returned JSON: " + pe.toString());
} catch (Exception e) {
LOGGER.error(e, "Unable get to data from external task: "+request.toString());
throw new DataAccessException("Unable to get data from external task: "+e.getMessage());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public FileInfo save(OutputStream saveTo, TableServerRequest dataRequest, Format
if (dataRequest != null) {
return processor.writeData(saveTo, dataRequest, format, mode);
} else {
throw new DataAccessException("Request fail inspection. Operation aborted.");
throw new DataAccessException("Request failed inspection. Operation aborted.");
}
} catch (Exception e) {
throw new DataAccessException("Error while writing to Stream", e);
Expand Down Expand Up @@ -107,7 +107,7 @@ public FileInfo getFileInfo(TableServerRequest request) throws DataAccessExcepti
}
} catch (ClassCastException e) {
LOGGER.error(e, "Invalid processor mapping. Return value is not of type FileInfo.");
throw new DataAccessException("Request failed due to unexpected exception.", e);
throw new DataAccessException("Request failed due to an unexpected exception.", e);
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,13 +341,13 @@ public static DataGroup getTableResult(String url, File workDir) throws DataAcce
// Must followRedirect because TAP specifically say this endpoint may be redirected.
HttpServices.Status status = HttpServices.getData(url, outFile);
if (status.isError()) {
throw createDax("Failed to retrieve the result from", url, status.getException());
throw createDax("Failed to retrieve the result", url, status.getException());
}
DataGroup[] results = VoTableReader.voToDataGroups(outFile.getAbsolutePath());
return results.length > 0 ? results[0] : null;

} catch (Exception e) {
throw createDax("Fail to fetch result", url, e);
throw createDax("Failed to fetch the result", url, e);
}
}

Expand All @@ -373,7 +373,7 @@ public static JobInfo getUwsJobInfo(String jobUrl) throws DataAccessException {
return new HttpServices.Status(404, error);
}
});
if (status.isError()) throw createDax("Fail to fetch UWS job info", jobUrl, status.getException());
if (status.isError()) throw createDax("Failed to fetch UWS job info", jobUrl, status.getException());
JobInfo jobInfo = jInfo.get();
if (jobInfo != null) jobInfo.getAux().setJobUrl(jobUrl);
return jobInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private List<FileGroup> computeFileGroup(DownloadRequest request) throws IOExcep
scanId = (String) dgData.get(rowIdx, "scan_id");
frameNum = (Integer) dgData.get(rowIdx, "frame_num");
if(scanId ==null || frameNum ==null){
throw new DataAccessException("Missing column name for downnloading images");
throw new DataAccessException("Missing column name for downloading images");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public URL getURL(ServerRequest sr) throws MalformedURLException {
return l1FileRetrieve.getURL(sr);
} else {
Logger.warn("cannot find param: productLevel or the param returns null");
throw new MalformedURLException("Can not find the file");
throw new MalformedURLException("Cannot find the file");
}

}
Expand All @@ -47,7 +47,7 @@ public static String getBaseURL(ServerRequest sr) throws MalformedURLException {
return PtfProcimsFileRetrieve.getBaseURL(sr);
} else {
Logger.warn("cannot find param: productLevel or the param returns null");
throw new MalformedURLException("Can not find the file");
throw new MalformedURLException("Cannot find the file");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public DataGroup fetchDataGroup(TableServerRequest req) throws DataAccessExcepti
var fileStr= (String)uploadParams.get("serverFile");
var circleSize= req.getParam("circleSize");
if (lonCol==null || latCol==null || fileStr==null || circleSize==null) {
throw new DataAccessException("lonCol, latCol, circleSize and serverFile is required");
throw new DataAccessException("lonCol, latCol, circleSize and serverFile are required");
}
updateJob(ji -> {
ji.getAux().setJobUrl(urlStr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ private DataGroup uploadedPreprocess(WiseRequest req) throws EndUserException, I
return dg;
}
}
throw new EndUserException("Can not find " + colName + " column in the uploaded table.", "Unable to create search request.");
throw new EndUserException("Cannot find " + colName + " column in the uploaded table.", "Unable to create search request.");
}

private File uploadedPostprocess(WiseRequest req, DataGroup inDg, File outFile) throws IpacTableException, IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public URL getURL(ServerRequest sr) throws MalformedURLException {
return sciFileRetrieve.getURL(sr);
} else {
Logger.warn("cannot find param: productLevel or the param returns null");
throw new MalformedURLException("Can not find the file");
throw new MalformedURLException("Cannot find the file");
}

}
Expand All @@ -53,7 +53,7 @@ public static String getBaseURL(ServerRequest sr) throws MalformedURLException {
return ZtfSciimsFileRetrieve.getBaseURL(sr);
} else {
Logger.warn("cannot find param: productLevel or the param returns null");
throw new MalformedURLException("Can not find the file");
throw new MalformedURLException("Cannot find the file");
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public static FileInfo downloadWithCacheMsg(Object uri) throws FailedRequestExce
**/
public static FileInfo downloadWithCacheMsg(Object uri, File downloadDir) throws FailedRequestException {
UriRef ref= UriRef.make(uri);
if (ref == null) throw new FailedRequestException("uri is not valid much be URL, String, S3Ref, or UriRef");
if (ref == null) throw new FailedRequestException("uri is not valid, must be a URL, String, S3Ref, or UriRef");
var params= new UriRefParams(ref,downloadDir);
params.setMaxSizeToDownload(VisContext.FITS_MAX_SIZE);
params.setExpectStaticFile(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,7 @@ public static List<TargetFixedSingle> getTargetList(File ufile) throws DataAcces
}
IpacTableTargetsParser.parseTargets(dg, targetList, true);
}
if (targetList.size()==0) throw createEndUserException("Unable to uploaded file:" + ufile.getName());
if (targetList.size()==0) throw createEndUserException("Unable to parse uploaded file: " + ufile.getName());

for (TargetFixedSingle t: targetList) {
//check for invalid targets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CtxControl {
private static final AtomicLong cnt = new AtomicLong(0);

public static void confirmFiles(PlotState state) throws FailedRequestException {
if (state==null) throw new FailedRequestException("state cannot but null");
if (state==null) throw new FailedRequestException("state cannot be null");
if (isFitsFilesMissing(state)) revalidatePlot(state,true); //most of the time the files are there so nothing happens
}

Expand All @@ -41,7 +41,7 @@ private static boolean isFitsFilesMissing(PlotState state) {
}

public static ActiveFitsReadGroup prepare(PlotState state) throws FailedRequestException {
if (state==null) throw new FailedRequestException("state cannot but null");
if (state==null) throw new FailedRequestException("state cannot be null");
try {
return revalidatePlot(state, false);
} catch (FailedRequestException e) {
Expand All @@ -67,7 +67,7 @@ private static ActiveFitsReadGroup revalidatePlot(PlotState state, boolean recre
} catch (IOException|FitsException e) {
if (recreate) Logger.getLogger().warn(e, "prepare failed on re-validate plot: " + e.getMessage());
throw new FailedRequestException(
recreate ? "Could not revalidate plot after recreation" : "Could ot revalidate",e);
recreate ? "Could not revalidate plot after recreation" : "Could not revalidate",e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ public FileInfo getFileByName(String fileName) throws FailedRequestException, Se
if (f==null) {
if (fStr.charAt(0)==File.separatorChar) {
if (new File(fStr).canRead()) {
throw new FailedRequestException("Could read file, "+
throw new FailedRequestException("Could not read file, "+
fileName +
" is not in the path specified by " +
"visualize.fits.search.path in the configuration file");
}
else {
throw new FailedRequestException("File not found", "Could not find your requested file, "+
"the file: " + fileName + " is was not found");
"the file: " + fileName + " was not found");
}
}
else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public static FileInfo get(AtlasImageParams params) throws FailedRequestExceptio
dataParam.setDoZip(true);
return ibe.getData(dataParam, null);
} else {
throw new FailedRequestException("Area not covered "+
throw new FailedRequestException("Area not covered in "+
params.getSchema()+"/"+params.getTable()+"/"+params.getBand());
}
} catch (IOException me) {
Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/Firefly.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function mergeAppOptions(ops, overrideOps) {
function renderRoot(root, viewer, props, webApiCommands) {
const element= document.getElementById(props.div);
if (!element) {
showInfoPopup('HTML page is not setup correctly, Firefly cannot start.');
showInfoPopup('HTML page is not set up correctly, Firefly cannot start.');
logger.error(`DOM Element "${props.div}" is not found in the document, Firefly cannot start.`);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/charts/ui/ColumnOrExpression.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const ColsShape = PropTypes.arrayOf(PropTypes.shape({
}));


const DEFAULT_MSG= 'Can not be empty. Please provide value or expression';
const DEFAULT_MSG= 'Cannot be empty. Please provide value or expression';

export function getColValidator(cols, required=true, canBeExpression=true, message=DEFAULT_MSG) {
const colNames = cols.map((colVal) => {return colVal.name;});
Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/charts/ui/CompareRowCharts.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function CompareRowCharts({fetchRowChart, activatePinnedCharts, rowLimit=

const buttonTip = 'Combine charts (from the selected rows)';
if (selectedRowIdxs.length > rowLimit) {
const content = `Number of rows selected for chart comparison exceeds the limit! Please select ${rowLimit} rows or lesser.`;
const content = `Number of rows selected for chart comparison exceeds the limit! Please select ${rowLimit} rows or fewer.`;
return (<CombineChartButton onClick={()=>showInfoPopup(content)} tip={buttonTip} {...slotProps?.button}/>);
}

Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/charts/ui/options/BasicOptions.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export function basicFieldReducer({chartId, activeTrace}) {
if (Number.isFinite(valMin)) {
if (logVal && valMin <= 0) {
inFields = updateSet(inFields, [v.min, 'valid'], false);
inFields = updateSet(inFields, [v.min, 'message'], 'The minimum of a log axis can not be 0 or less');
inFields = updateSet(inFields, [v.min, 'message'], 'The minimum of a log axis cannot be 0 or less');
} else {
const valMax = Number.parseFloat(get(inFields, [v.max, 'value']));
if (Number.isFinite(valMax) && valMin > valMax) {
Expand Down
2 changes: 1 addition & 1 deletion src/firefly/js/metaConvert/AnalysisUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export function makeAnalysisGetGridDataProduct(makeReq) {
const activate = createGridImagesActivate(newReqAry, imageViewerId, table.tbl_id, plotRows);
return Promise.resolve(dpdtImage({name:'Image', activate}));
} else {
return Promise.resolve(dpdtMessage('This product cannot be show in image grid', undefined, {gridNotSupported: true}));
return Promise.resolve(dpdtMessage('This product cannot be shown in image grid', undefined, {gridNotSupported: true}));
}
})
.catch(() => {
Expand Down
Loading
Loading