mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-09-24 16:04:36 +08:00
CB-3968 prettify error (#2862)
* CB-3968 prettify error * CB-3968 return only rm error message --------- Co-authored-by: Evgenia Bezborodova <139753579+EvgeniaBzzz@users.noreply.github.com>
This commit is contained in:
co-authored by
Evgenia Bezborodova
parent
00c1cc81ac
commit
dfd5838f38
+3
@@ -630,6 +630,9 @@ public class LocalResourceController implements RMController {
|
||||
}
|
||||
Path newTargetPath = getTargetPath(projectId, normalizedNewResourcePath);
|
||||
validateResourcePath(newTargetPath.toString());
|
||||
if (Files.exists(newTargetPath)) {
|
||||
throw new DBException("Resource with name %s already exists".formatted(newTargetPath.getFileName()));
|
||||
}
|
||||
try {
|
||||
Files.move(oldTargetPath, newTargetPath);
|
||||
} catch (IOException e) {
|
||||
|
||||
+1
-1
@@ -214,7 +214,7 @@ public class WebServiceRM implements DBWServiceRM {
|
||||
WSResourceProperty.NAME);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
throw new DBWebException("Error moving resource " + oldResourcePath, e);
|
||||
throw new DBWebException(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user