mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-13 23:44:09 +01:00
uri - print a warning when an URI lacks a scheme, #56108
This commit is contained in:
@@ -13,10 +13,11 @@ const _doubleSlashStart = /^\/\//;
|
||||
|
||||
function _validateUri(ret: URI): void {
|
||||
|
||||
// // scheme, must be set
|
||||
// if (!ret.scheme) {
|
||||
// throw new Error('[UriError]: Scheme is missing.');
|
||||
// }
|
||||
// scheme, must be set
|
||||
if (!ret.scheme) {
|
||||
// throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
|
||||
console.warn(`[UriError]: Scheme is missing: {scheme: "", authority: "${ret.authority}", path: "${ret.path}", query: "${ret.query}", fragment: "${ret.fragment}"}`);
|
||||
}
|
||||
|
||||
// scheme, https://tools.ietf.org/html/rfc3986#section-3.1
|
||||
// ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
|
||||
|
||||
Reference in New Issue
Block a user