Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Instrument Control
NomadCommandSystem
Commits
d45a91b4
Commit
d45a91b4
authored
Feb 08, 2016
by
helene ortiz
Browse files
remove DriverNotFoundException
parent
43e47a2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/fr/ill/ics/util/exception/DriverNotFoundException.java
deleted
100644 → 0
View file @
43e47a2d
/*
* Nomad Instrument Control Software
*
* Copyright 2011 Institut Laue-Langevin
*
* Licensed under the EUPL, Version 1.1 only (the "License");
* You may not use this work except in compliance with the Licence.
* You may obtain a copy of the Licence at:
*
* http://joinup.ec.europa.eu/software/page/eupl
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the Licence is distributed on an "AS IS" basis,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the Licence for the specific language governing permissions and
* limitations under the Licence.
*/
package
fr.ill.ics.util.exception
;
import
fr.ill.ics.util.ConfigManager
;
/**
*
* @author ortizh
*
*/
public
class
DriverNotFoundException
extends
ConfigurationException
{
private
final
static
String
DEFAULT_MESSAGE
=
ConfigManager
.
getInstance
().
getString
(
"driverNotFoundExceptionMessage"
);
private
String
driverName
;
public
DriverNotFoundException
(
String
driverName
,
String
driverType
,
String
className
,
String
methodName
)
{
super
(
DEFAULT_MESSAGE
,
driverType
,
null
,
className
,
methodName
);
this
.
driverName
=
driverName
;
ConfigManager
.
getInstance
().
addConfigurationException
(
this
);
}
private
String
getDriverName
()
{
return
driverName
;
}
public
boolean
equals
(
Object
object
)
{
if
(
this
==
object
)
{
return
true
;
}
if
(!(
object
instanceof
DriverNotFoundException
))
{
return
false
;
}
DriverNotFoundException
controllerNotFoundException
=
(
DriverNotFoundException
)
object
;
if
(
this
.
driverName
.
equals
(
controllerNotFoundException
.
getDriverName
()))
{
if
(
this
.
driverName
!=
null
)
{
return
(
this
.
driverName
.
equals
(
controllerNotFoundException
.
getDriverName
()));
}
return
(
this
.
controllerType
.
equals
(
controllerNotFoundException
.
getControllerType
()));
}
return
false
;
}
public
int
hashCode
()
{
return
(
this
.
getMessage
()
+
this
.
getDriverName
()
+
this
.
getControllerType
()).
hashCode
();
}
protected
void
addToConfigManager
()
{
// Already called in constructor => must not do anything
}
public
String
toString
()
{
return
getMessage
()
+
driverName
+
(
controllerType
==
null
?
""
:
" (controller type: "
+
controllerType
+
")"
)
+
"\n"
+
getClassName
()
+
".."
+
getMethodName
();
}
public
String
format
()
{
return
getMessage
()
+
" "
+
driverName
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment