2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

GAS エラーログを具体的に出力する(コピペOK)

Posted at

GASでログを出力する時に割といつも面倒なのでフレームワーク化したらここはこうしたい。


function execErrorDetails(error) {
  var resultMessage = "message:" + error.message + "\nfileName:" + error.fileName + "\nlineNumber:" + error.lineNumber + "\nstack:" + error.stack
  Logger.log(resultMessage)
  return resultMessage
}
[20-01-13 11:18:09:430 JST] message:aが定義されていません
fileName:main
lineNumber:45
stack:	at main:45 (append)
	at main:26 (setMonthlyReport)
	at main:2 (jobSetMonthlyReport)
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?