Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
generators
EMADL2CPP
Commits
57cf485e
Commit
57cf485e
authored
Jan 22, 2019
by
nilsfreyer
Browse files
added Error-Stream of the training
parent
c8eaeb92
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/monticar/emadl/generator/EMADLGenerator.java
View file @
57cf485e
...
...
@@ -186,15 +186,22 @@ public class EMADLGenerator {
ProcessBuilder
pb
=
new
ProcessBuilder
(
Arrays
.
asList
(
pythonExe
,
trainingPath
));
Process
p
=
pb
.
start
();
BufferedReader
bfr
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()));
BufferedReader
bfr1
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getInputStream
()));
BufferedReader
bfr2
=
new
BufferedReader
(
new
InputStreamReader
(
p
.
getErrorStream
()));
String
line
=
""
;
System
.
out
.
println
(
"Starting training of "
+
trainConfigFilename
);
int
exitCode
=
p
.
waitFor
();
System
.
out
.
println
(
"Exit Code : "
+
exitCode
);
line
=
bfr
.
readLine
();
line
=
bfr
1
.
readLine
();
System
.
out
.
println
(
"First Line: "
+
line
);
while
((
line
=
bfr
.
readLine
())
!=
null
){
System
.
out
.
println
(
"python output:"
+
line
);
while
(
line
!=
null
){
System
.
out
.
println
(
line
);
line
=
bfr1
.
readLine
();
}
line
=
bfr2
.
readLine
();
while
(
line
!=
null
){
System
.
out
.
println
(
line
);
line
=
bfr2
.
readLine
();
}
}
catch
(
Exception
e
){
System
.
out
.
println
(
e
);}
}
else
{
System
.
out
.
println
(
"Trainingfile not found."
);}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment