Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion google/cloud/dataproc_spark_connect/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from google.cloud.dataproc_spark_connect.environment import is_colab, is_colab_enterprise


class DataprocSparkConnectException(Exception):
"""A custom exception class to only print the error messages.
Expand All @@ -24,4 +26,8 @@ def __init__(self, message):
super().__init__(message)

def _render_traceback_(self):
return [self.message]
return (
self.message
if is_colab or is_colab_enterprise
else self.render_traceback()
)