mirror of
https://github.com/SynologyOpenSource/pkgscripts-ng.git
synced 2025-08-13 14:23:40 +00:00
Release for DSM7.0
This commit is contained in:
34
include/python/pkgerror.py
Normal file
34
include/python/pkgerror.py
Normal file
@ -0,0 +1,34 @@
|
||||
#! /usr/bin/python3
|
||||
# Copyright (c) 2000-2020 Synology Inc. All rights reserved.
|
||||
|
||||
import logging
|
||||
|
||||
|
||||
class PkgCreateError(RuntimeError):
|
||||
def __init__(self, title, msg=[]):
|
||||
logging.error('[ERROR] ' + title)
|
||||
if isinstance(msg, list):
|
||||
for line in msg:
|
||||
logging.error(line)
|
||||
else:
|
||||
logging.error(msg)
|
||||
|
||||
|
||||
|
||||
class CollectPackageError(PkgCreateError):
|
||||
pass
|
||||
|
||||
|
||||
class LinkPackageError(PkgCreateError):
|
||||
pass
|
||||
|
||||
class BuildPackageError(PkgCreateError):
|
||||
pass
|
||||
|
||||
|
||||
class InstallPacageError(PkgCreateError):
|
||||
pass
|
||||
|
||||
|
||||
class TraverseProjectError(PkgCreateError):
|
||||
pass
|
Reference in New Issue
Block a user