|
|
@ -213,19 +213,26 @@ class CompilerCall(object):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
subprocess.check_call(command, stderr=file_out)
|
|
|
|
subprocess.check_call(command, stderr=file_out)
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
error_msg = 'ERROR: failure during compilation command.' \
|
|
|
|
try:
|
|
|
|
+ '\nYou can run the failing compilation ' \
|
|
|
|
fallback_command = ['javac'] + cli_args + \
|
|
|
|
+ 'command again by copy-pasting the\nlines ' \
|
|
|
|
['@' + str(self.command_line_file)]
|
|
|
|
+ 'below in your terminal:\n\n"""\n' \
|
|
|
|
subprocess.check_call(
|
|
|
|
+ 'python <<EOF\n' \
|
|
|
|
fallback_command, stderr=file_out)
|
|
|
|
+ 'import subprocess\n' \
|
|
|
|
except subprocess.CalledProcessError:
|
|
|
|
+ 'cmd = {}\n' \
|
|
|
|
error_msg = 'ERROR: failure during compilation ' \
|
|
|
|
+ 'subprocess.check_call(cmd)\n' \
|
|
|
|
+ 'command.\nYou can run the failing ' \
|
|
|
|
+ 'EOF\n"""\n'
|
|
|
|
+ 'compilation command again by ' \
|
|
|
|
failing_cmd = filter(lambda arg: arg != '-verbose',
|
|
|
|
+ 'copy-pasting the\nlines below in ' \
|
|
|
|
command)
|
|
|
|
+ 'your terminal:\n\n"""\n' \
|
|
|
|
utils.stderr(error_msg.format(failing_cmd))
|
|
|
|
+ 'python <<EOF\n' \
|
|
|
|
subprocess.check_call(failing_cmd)
|
|
|
|
+ 'import subprocess\n' \
|
|
|
|
|
|
|
|
+ 'cmd = {}\n' \
|
|
|
|
|
|
|
|
+ 'subprocess.check_call(cmd)\n' \
|
|
|
|
|
|
|
|
+ 'EOF\n"""\n'
|
|
|
|
|
|
|
|
failing_cmd = filter(lambda arg: arg != '-verbose',
|
|
|
|
|
|
|
|
command)
|
|
|
|
|
|
|
|
utils.stderr(error_msg.format(failing_cmd))
|
|
|
|
|
|
|
|
subprocess.check_call(failing_cmd)
|
|
|
|
|
|
|
|
|
|
|
|
return os.EX_OK
|
|
|
|
return os.EX_OK
|
|
|
|
|
|
|
|
|
|
|
|