Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
NomadGUI
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Instrument Control
NomadGUI
Commits
f3e3d507
Commit
f3e3d507
authored
4 years ago
by
ics
Browse files
Options
Downloads
Patches
Plain Diff
Manage UnknownHostException in case scidata service is down.
parent
04509f57
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+5
-0
5 additions, 0 deletions
ChangeLog
conf/client/clientMessages.properties
+2
-0
2 additions, 0 deletions
conf/client/clientMessages.properties
src/main/java/fr/ill/ics/common/Nomad.java
+8
-1
8 additions, 1 deletion
src/main/java/fr/ill/ics/common/Nomad.java
with
15 additions
and
1 deletion
ChangeLog
+
5
−
0
View file @
f3e3d507
4.0.22 dd/06/2020
------
* Manage UnknownHostException in case scidata service is down.
4.0.21 05/06/2020
------
* Improve messages about token state.
...
...
This diff is collapsed.
Click to expand it.
conf/client/clientMessages.properties
+
2
−
0
View file @
f3e3d507
...
...
@@ -230,6 +230,8 @@ serviceUnavailableErrorMessageKey=SI service unavailable.
genericErrorMessageKey
=
Unable to connect to SI server.
connectionTimeoutErrorMessageKey
=
A timeout occurred while connecting to SI server.
\n
Nomad will automatically switch to internal use. Try again later.
connectionTimeoutErrorMessageTitle
=
Getting proposals
unknownHostMessageKey
=
Unknown host:
parentDirectoryLabel
=
Parent folder:
newFolderMessage
=
new folder...
...
...
This diff is collapsed.
Click to expand it.
src/main/java/fr/ill/ics/common/Nomad.java
+
8
−
1
View file @
f3e3d507
...
...
@@ -35,6 +35,7 @@ import java.net.HttpURLConnection;
import
java.net.MalformedURLException
;
import
java.net.SocketTimeoutException
;
import
java.net.URL
;
import
java.net.UnknownHostException
;
import
java.text.DateFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
...
...
@@ -1235,6 +1236,10 @@ public abstract class Nomad {
br
.
close
();
JSONParser
parser
=
new
JSONParser
();
object
=
(
JSONObject
)
parser
.
parse
(
jsonString
);
}
catch
(
UnknownHostException
e
)
{
String
message
=
ConfigManager
.
getInstance
().
getString
(
"unknownHostMessageKey"
)
+
" "
+
e
.
getLocalizedMessage
();
DialogManager
.
getInstance
().
nomadMessageDialog
(
message
,
""
);
return
null
;
}
catch
(
SocketTimeoutException
e
)
{
// can be thrown by getInputStream
DialogManager
.
getInstance
().
nomadMessageDialog
(
"connectionTimeoutErrorMessageKey"
,
"connectionTimeoutErrorMessageTitle"
);
return
null
;
...
...
@@ -1244,7 +1249,9 @@ public abstract class Nomad {
e
.
printStackTrace
();
}
finally
{
try
{
br
.
close
();
if
(
br
!=
null
)
{
br
.
close
();
}
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment