hprasath commited on
Commit
8bda14e
1 Parent(s): 2481e05

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +4 -1
index.js CHANGED
@@ -66,7 +66,10 @@ const compileJava = (code, input, res) => {
66
  { timeout: TIMEOUT_VALUE },
67
  (error, stdout, stderr) => {
68
  if (error) {
69
- if (error.killed) {
 
 
 
70
  console.error("Time Limit Exceeded!!");
71
  res.send({ error: "Time Limit Exceeded!!" });
72
  } else {
 
66
  { timeout: TIMEOUT_VALUE },
67
  (error, stdout, stderr) => {
68
  if (error) {
69
+ if (error.code === 1) {
70
+ console.error(stderr);
71
+ res.send({ error: stderr });
72
+ } else if (error.killed) {
73
  console.error("Time Limit Exceeded!!");
74
  res.send({ error: "Time Limit Exceeded!!" });
75
  } else {