Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
biopet.biopet
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Analyze
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirrors
biopet.biopet
Commits
7e4ca301
Commit
7e4ca301
authored
10 years ago
by
Peter van 't Hof
Browse files
Options
Downloads
Patches
Plain Diff
Fix hidden stacktraces
parent
86eebea5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala
+19
-21
19 additions, 21 deletions
...lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala
with
19 additions
and
21 deletions
public/biopet-framework/src/main/scala/nl/lumc/sasc/biopet/core/workaround/BiopetQCommandLine.scala
+
19
−
21
View file @
7e4ca301
...
...
@@ -81,19 +81,15 @@ object BiopetQCommandLine extends GatkLogging {
Runtime
.
getRuntime
.
addShutdownHook
(
shutdownHook
)
CommandLineProgram
.
start
(
qCommandLine
,
argv
)
try
{
CommandLineProgram
.
start
(
qCommandLine
,
argv
)
try
{
Runtime
.
getRuntime
.
removeShutdownHook
(
shutdownHook
)
qCommandLine
.
shutdown
()
}
catch
{
case
e
:
Exception
=>
/* ignore, example 'java.lang.IllegalStateException: Shutdown in progress' */
}
if
(
CommandLineProgram
.
result
!=
0
)
System
.
exit
(
CommandLineProgram
.
result
)
Runtime
.
getRuntime
.
removeShutdownHook
(
shutdownHook
)
qCommandLine
.
shutdown
()
}
catch
{
case
e
:
Exception
=>
CommandLineProgram
.
exitSystemWithError
(
e
)
case
e
:
Exception
=>
/* ignore, example 'java.lang.IllegalStateException: Shutdown in progress' */
}
if
(
CommandLineProgram
.
result
!=
0
)
System
.
exit
(
CommandLineProgram
.
result
)
}
}
...
...
@@ -114,21 +110,28 @@ class BiopetQCommandLine extends CommandLineProgram with Logging {
private
var
qScriptClasses
:
File
=
_
private
var
shuttingDown
=
false
/**
* we modified this in Biopet to skip compiling and show full stacktrace again
*/
private
lazy
val
qScriptPluginManager
=
{
qScriptClasses
=
IOUtils
.
tempDir
(
"Q-Classes-"
,
""
,
settings
.
qSettings
.
tempDirectory
)
//qScriptManager.loadScripts(scripts, qScriptClasses)
//var temp: Seq[URL] = Seq()
for
(
t
<-
scripts
)
{
val
is
=
getClass
.
getResourceAsStream
(
t
.
getAbsolutePath
)
val
os
=
new
FileOutputStream
(
qScriptClasses
.
getAbsolutePath
+
"/"
+
t
.
getName
)
org
.
apache
.
commons
.
io
.
IOUtils
.
copy
(
is
,
os
)
os
.
close
()
//temp :+= this.getClass.getResource(t.toString)
//logger.info(this.getClass.getResource(t.toString))
val
s
=
if
(
t
.
getName
.
endsWith
(
"/"
))
t
.
getName
.
substring
(
0
,
t
.
getName
.
length
-
1
)
else
t
.
getName
pipelineName
=
s
.
substring
(
0
,
s
.
lastIndexOf
(
"."
))
+
"."
+
System
.
currentTimeMillis
}
new
PluginManager
[
QScript
](
qPluginType
,
List
(
qScriptClasses
.
toURI
.
toURL
))
// override createByType to pass the correct exceptions
new
PluginManager
[
QScript
](
qPluginType
,
List
(
qScriptClasses
.
toURI
.
toURL
))
{
override
def
createByType
(
plugintype
:
Class
[
_
<:
QScript
])
=
{
val
noArgsConstructor
=
plugintype
.
getDeclaredConstructor
()
noArgsConstructor
.
setAccessible
(
true
)
noArgsConstructor
.
newInstance
()
}
}
}
private
lazy
val
qCommandPlugin
=
{
...
...
@@ -186,12 +189,7 @@ class BiopetQCommandLine extends CommandLineProgram with Logging {
//if (settings.run)
script
.
pullInputs
()
script
.
qSettings
=
settings
.
qSettings
try
{
script
.
script
()
}
catch
{
case
e
:
Exception
=>
throw
new
UserException
.
CannotExecuteQScript
(
script
.
getClass
.
getSimpleName
+
".script() threw the following exception: "
+
e
,
e
)
}
script
.
script
()
if
(
remoteFileConverter
!=
null
)
{
if
(
remoteFileConverter
.
convertToRemoteEnabled
)
...
...
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