Log unknown nodes better
This commit is contained in:
1 parent
d919489f50
commit
e8015d52ff
1 file changed
+3
-3
@@ -25,7 +25,7 @@ namespace Innertube
|
|||||||
for each key in nodeData
|
for each key in nodeData
|
||||||
directive = directives[key]
|
directive = directives[key]
|
||||||
if directive = invalid
|
if directive = invalid
|
||||||
LogWarn("Unknown node", key)
|
LogWarn("Unknown node", key, `\n`, FormatJson(nodeData[key]))
|
||||||
#if THROW_ON_UNKNOWN_NODES
|
#if THROW_ON_UNKNOWN_NODES
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
throw "Unknown node: " + key
|
throw "Unknown node: " + key
|
||||||
@@ -684,7 +684,7 @@ namespace Innertube
|
|||||||
return LockupViewModelTypeAlbum(nodeData, context)
|
return LockupViewModelTypeAlbum(nodeData, context)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
LogWarn("Unknown content type:", contentType, `\n`, nodeData)
|
LogWarn("Unknown content type:", contentType, `\n`, FormatJson(nodeData))
|
||||||
#if THROW_ON_UNKNOWN_NODES
|
#if THROW_ON_UNKNOWN_NODES
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
throw "Unknown content type: " + contentType
|
throw "Unknown content type: " + contentType
|
||||||
@@ -874,7 +874,7 @@ namespace Innertube
|
|||||||
return TileRendererTypePlaylist(nodeData, context)
|
return TileRendererTypePlaylist(nodeData, context)
|
||||||
end if
|
end if
|
||||||
|
|
||||||
LogWarn("Unknown content type:", contentType, `\n`, nodeData)
|
LogWarn("Unknown content type:", contentType, `\n`, FormatJson(nodeData))
|
||||||
#if THROW_ON_UNKNOWN_NODES
|
#if THROW_ON_UNKNOWN_NODES
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
throw "Unknown content type: " + contentType
|
throw "Unknown content type: " + contentType
|
||||||
|
|||||||
Reference in new issue
Block a user